Subversion Repositories XServices

Compare Revisions

Ignore whitespace Rev 67 → Rev 68

/xservices/trunk/src/java/net/brutex/xservices/ws/DateService.java
54,10 → 54,12
public static final String OPERATION_PARSEDATEADVANCED = "parseDateAdvanced";
public static final String OPERATION_DATETIMEDIFF = "dateTimeDiff";
public static final String OPERATION_DATETIMEDIFF2 = "dateTimeDiff2";
public static final String OPERATION_DATEADD = "dateAdd";
public static final String PARAM_TIMEZONE = "timezone";
public static final String PARAM_DATETIME = "datetime";
public static final String PARAM_FORMAT = "format";
public static final String PARAM_UNIT = "unit";
/**
* Get current date and time.
142,5 → 144,21
public abstract BigInteger dateTimeDiff2(
@WebParam(name="fromDateTime") @XmlElement(required=true) GregorianCalendar fromCal,
@WebParam(name="toDateTime") @XmlElement(required=true) GregorianCalendar toCal,
@WebParam(name="unit") DateTimeUnits unit) throws XServicesFault;
@WebParam(name="PARAM_UNIT") DateTimeUnits unit) throws XServicesFault;
/**
* Add or substract a time span from a date.
*
* @param cal
* @param unit
* @return New date and time.
* @throws XServicesFault
*/
@WebMethod(operationName=OPERATION_DATEADD)
@WSDLDocumentation(value="Add or substract a time span from a date.")
public abstract GregorianCalendar dateAdd(
@WebParam(name=PARAM_DATETIME) @XmlElement(required=true) GregorianCalendar cal,
@WebParam(name="value") @XmlElement(required=true) BigInteger value,
@WebParam(name=PARAM_UNIT) @XmlElement(required=true) DateTimeUnits unit) throws XServicesFault;
}