@WSDLDocumentationCollection(value=@WSDLDocumentation(value="/*\n* Copyright 2010 Brian Rosenberger (Brutex Network)\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\")\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/",placement=TOP))
public interface DateService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OPERATION_DATEADD |
static java.lang.String |
OPERATION_DATETIMEDIFF |
static java.lang.String |
OPERATION_DATETIMEDIFF2 |
static java.lang.String |
OPERATION_FORMATDATE |
static java.lang.String |
OPERATION_FORMATDATEADVANCED |
static java.lang.String |
OPERATION_GETDATE |
static java.lang.String |
OPERATION_GETDATEEXTENDED |
static java.lang.String |
OPERATION_GETINTIMEZONE |
static java.lang.String |
OPERATION_GETTIMESTAMP |
static java.lang.String |
OPERATION_GETTIMESTAMP2 |
static java.lang.String |
OPERATION_GETTIMEZONES |
static java.lang.String |
OPERATION_PARSEDATE |
static java.lang.String |
OPERATION_PARSEDATEADVANCED |
static java.lang.String |
PARAM_DATETIME |
static java.lang.String |
PARAM_FORMAT |
static java.lang.String |
PARAM_TIMEZONE |
static java.lang.String |
PARAM_UNIT |
static java.lang.String |
SERVICE_NAME |
Modifier and Type | Method and Description |
---|---|
java.util.GregorianCalendar |
dateAdd(java.util.GregorianCalendar cal,
java.math.BigInteger value,
DateTimeUnits unit)
Add or subtract a time span from a date.
|
java.math.BigInteger |
dateTimeDiff(java.util.Date fromCal,
java.util.Date toCal)
Calculate elapsed time between two dates.
|
java.math.BigInteger |
dateTimeDiff2(java.util.Date fromCal,
java.util.Date toCal,
DateTimeUnits unit)
Fully elapsed units between two dates.
|
java.lang.String |
formatDate(java.util.Date cal,
DateFormatType format)
Formats a date with pre-defined patterns.
|
java.lang.String |
formatDateAdvanced(java.util.Date cal,
java.lang.String format)
Formats a date with a free form pattern.
|
DateInfoType |
getDate()
Get current date and time.
|
DateInfoExtendedType |
getDateExtended()
Get current date and time (extended version).
|
java.lang.String |
getInTimezone(java.util.Date cal,
java.lang.String timezone)
Display a date time with a different time zone.
|
java.math.BigInteger |
getTimestamp()
Get milliseconds since 01.01.1970.
|
java.math.BigInteger |
getTimestamp2()
Get seconds since 01.01.1970.
|
java.util.List<TimeZoneType> |
getTimezones() |
java.util.Date |
parseDate(java.lang.String s,
DateFormatType format,
java.lang.String timezone)
Converts a string into date using pre-defined date formats.
|
java.util.GregorianCalendar |
parseDateAdvanced(java.lang.String s,
java.lang.String format,
java.lang.String timezone)
Converts a string into date using any format.
|
static final java.lang.String SERVICE_NAME
static final java.lang.String OPERATION_GETDATE
static final java.lang.String OPERATION_GETDATEEXTENDED
static final java.lang.String OPERATION_GETTIMESTAMP
static final java.lang.String OPERATION_GETTIMESTAMP2
static final java.lang.String OPERATION_GETINTIMEZONE
static final java.lang.String OPERATION_FORMATDATE
static final java.lang.String OPERATION_FORMATDATEADVANCED
static final java.lang.String OPERATION_PARSEDATE
static final java.lang.String OPERATION_PARSEDATEADVANCED
static final java.lang.String OPERATION_DATETIMEDIFF
static final java.lang.String OPERATION_DATETIMEDIFF2
static final java.lang.String OPERATION_DATEADD
static final java.lang.String OPERATION_GETTIMEZONES
static final java.lang.String PARAM_TIMEZONE
static final java.lang.String PARAM_DATETIME
static final java.lang.String PARAM_FORMAT
static final java.lang.String PARAM_UNIT
@WSDLDocumentation(value="Get current date and time.") DateInfoType getDate() throws XServicesFault
XServicesFault
@WSDLDocumentation(value="Get current date and time in different formats.") DateInfoExtendedType getDateExtended() throws XServicesFault
XServicesFault
@WSDLDocumentation(value="Get milliseconds since 01.01.1970 (Unix timestap).") java.math.BigInteger getTimestamp()
@WSDLDocumentation(value="Get seconds since 01.01.1970 (Unix timestap).") java.math.BigInteger getTimestamp2()
java.lang.String getInTimezone(java.util.Date cal, java.lang.String timezone) throws XServicesFault
cal
- date time.timezone
- time zoneXServicesFault
java.lang.String formatDate(java.util.Date cal, DateFormatType format) throws XServicesFault
cal
- date time to be formatted in ISO8601format
- Pattern to be used for date formatingXServicesFault
java.util.List<TimeZoneType> getTimezones() throws XServicesFault
XServicesFault
java.lang.String formatDateAdvanced(java.util.Date cal, java.lang.String format) throws XServicesFault
cal
- Date time to be formattedformat
- Format stringXServicesFault
@WSDLDocumentation(value="Converts a string into date using pre-defined date formats.") java.util.Date parseDate(java.lang.String s, DateFormatType format, java.lang.String timezone) throws XServicesFault
s
- Date/ time as stringformat
- date formattimezone
- timezoneXServicesFault
java.util.GregorianCalendar parseDateAdvanced(java.lang.String s, java.lang.String format, java.lang.String timezone) throws XServicesFault
s
- date/ time as stringformat
- date formattimezone
- timezoneXServicesFault
java.math.BigInteger dateTimeDiff(java.util.Date fromCal, java.util.Date toCal) throws XServicesFault
fromCal
- First date.toCal
- Second date.XServicesFault
@WSDLDocumentation(value="Get elapsed time between to dates.") java.math.BigInteger dateTimeDiff2(java.util.Date fromCal, java.util.Date toCal, DateTimeUnits unit) throws XServicesFault
fromCal
- toCal
- unit
- XServicesFault
@WSDLDocumentation(value="Add or substract a time span from a date.") java.util.GregorianCalendar dateAdd(java.util.GregorianCalendar cal, java.math.BigInteger value, DateTimeUnits unit) throws XServicesFault
cal
- The initial date.value
- The amount to add.unit
- The unit the amount is defined in.XServicesFault