Subversion Repositories XServices

Rev

Rev 66 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 66 Rev 68
Line 147... Line 147...
147
			d = d.divide(new BigInteger("86400000"));
147
			d = d.divide(new BigInteger("86400000"));
148
		}
148
		}
149
		return d;
149
		return d;
150
	}
150
	}
Line -... Line 151...
-
 
151
	
-
 
152
	@Override
-
 
153
	public GregorianCalendar dateAdd(GregorianCalendar cal, BigInteger value, DateTimeUnits unit)
-
 
154
			throws XServicesFault {
-
 
155
		switch (unit) {
-
 
156
		case SECONDS:
-
 
157
			cal.add(GregorianCalendar.SECOND, value.intValue());
-
 
158
			break;
-
 
159
		case MINUTES:
-
 
160
			cal.add(GregorianCalendar.MINUTE, value.intValue());
-
 
161
			break;
-
 
162
		case HOURS:
-
 
163
			cal.add(GregorianCalendar.HOUR_OF_DAY, value.intValue());
-
 
164
			break;
-
 
165
		case DAYS:
-
 
166
			cal.add(GregorianCalendar.DAY_OF_MONTH, value.intValue());
-
 
167
			break;
-
 
168
		default:
-
 
169
			cal.add(GregorianCalendar.MILLISECOND, value.intValue());
-
 
170
		}
-
 
171
		return cal;
-
 
172
	}
151
	
173
	
152
	private boolean isValidTimezone(String id) {
174
	private boolean isValidTimezone(String id) {
153
		boolean yes = false;
175
		boolean yes = false;
154
		for( String s: TimeZone.getAvailableIDs()) {
176
		for( String s: TimeZone.getAvailableIDs()) {
155
			if(s.equals(id)) {
177
			if(s.equals(id)) {