public class ExsltDatetime
extends java.lang.Object
xmlns:datetime="http://exslt.org/dates-and-times"The documentation for each function has been copied from the relevant EXSLT Implementer page.
Constructor | Description |
---|---|
ExsltDatetime() |
Modifier and Type | Method | Description |
---|---|---|
static java.lang.String |
date() |
See above.
|
static java.lang.String |
date(java.lang.String datetimeIn) |
The date:date function returns the date specified in the date/time string given
as the argument.
|
static java.lang.String |
dateTime() |
The date:date-time function returns the current date and time as a date/time string.
|
static java.lang.String |
dayAbbreviation() |
See above.
|
static java.lang.String |
dayAbbreviation(java.lang.String datetimeIn) |
The date:day-abbreviation function returns the abbreviation of the day
of the week of a date.
|
static double |
dayInMonth() |
See above.
|
static double |
dayInMonth(java.lang.String datetimeIn) |
The date:day-in-month function returns the day of a date as a number.
|
static double |
dayInWeek() |
See above.
|
static double |
dayInWeek(java.lang.String datetimeIn) |
The date:day-in-week function returns the day of the week given in a
date as a number.
|
static double |
dayInYear() |
See above.
|
static double |
dayInYear(java.lang.String datetimeIn) |
The date:day-in-year function returns the day of a date in a year
as a number.
|
static java.lang.String |
dayName() |
See above.
|
static java.lang.String |
dayName(java.lang.String datetimeIn) |
The date:day-name function returns the full name of the day of the week
of a date.
|
static double |
dayOfWeekInMonth() |
See above.
|
static double |
dayOfWeekInMonth(java.lang.String datetimeIn) |
The date:day-of-week-in-month function returns the day-of-the-week
in a month of a date as a number (e.g. 3 for the 3rd Tuesday in May).
|
static java.lang.String |
formatDate(java.lang.String dateTime,
java.lang.String pattern) |
The date:format-date function formats a date/time according to a pattern.
|
static double |
hourInDay() |
See above.
|
static double |
hourInDay(java.lang.String datetimeIn) |
The date:hour-in-day function returns the hour of the day as a number.
|
static boolean |
leapYear() |
See above.
|
static XObject |
leapYear(java.lang.String datetimeIn) |
The date:leap-year function returns true if the year given in a date
is a leap year.
|
static double |
minuteInHour() |
See above.
|
static double |
minuteInHour(java.lang.String datetimeIn) |
The date:minute-in-hour function returns the minute of the hour
as a number.
|
static java.lang.String |
monthAbbreviation() |
See above.
|
static java.lang.String |
monthAbbreviation(java.lang.String datetimeIn) |
The date:month-abbreviation function returns the abbreviation of the month of
a date.
|
static double |
monthInYear() |
See above.
|
static double |
monthInYear(java.lang.String datetimeIn) |
The date:month-in-year function returns the month of a date as a number.
|
static java.lang.String |
monthName() |
See above.
|
static java.lang.String |
monthName(java.lang.String datetimeIn) |
The date:month-name function returns the full name of the month of a date.
|
static double |
secondInMinute() |
See above.
|
static double |
secondInMinute(java.lang.String datetimeIn) |
The date:second-in-minute function returns the second of the minute
as a number.
|
static java.lang.String |
time() |
See above.
|
static java.lang.String |
time(java.lang.String timeIn) |
The date:time function returns the time specified in the date/time string given
as the argument.
|
static double |
weekInYear() |
See above.
|
static double |
weekInYear(java.lang.String datetimeIn) |
The date:week-in-year function returns the week of the year as a number.
|
static double |
year() |
See above.
|
static double |
year(java.lang.String datetimeIn) |
The date:year function returns the year of a date as a number.
|
public static java.lang.String dateTime()
public static java.lang.String date(java.lang.String datetimeIn) throws java.text.ParseException
java.text.ParseException
public static java.lang.String date()
public static java.lang.String time(java.lang.String timeIn) throws java.text.ParseException
java.text.ParseException
public static java.lang.String time()
public static double year(java.lang.String datetimeIn) throws java.text.ParseException
java.text.ParseException
public static double year()
public static double monthInYear(java.lang.String datetimeIn) throws java.text.ParseException
java.text.ParseException
public static double monthInYear()
public static double weekInYear(java.lang.String datetimeIn) throws java.text.ParseException
java.text.ParseException
public static double weekInYear()
public static double dayInYear(java.lang.String datetimeIn) throws java.text.ParseException
java.text.ParseException
public static double dayInYear()
public static double dayInMonth(java.lang.String datetimeIn) throws java.text.ParseException
java.text.ParseException
public static double dayInMonth()
public static double dayOfWeekInMonth(java.lang.String datetimeIn) throws java.text.ParseException
java.text.ParseException
public static double dayOfWeekInMonth()
public static double dayInWeek(java.lang.String datetimeIn) throws java.text.ParseException
java.text.ParseException
public static double dayInWeek()
public static double hourInDay(java.lang.String datetimeIn) throws java.text.ParseException
java.text.ParseException
public static double hourInDay()
public static double minuteInHour(java.lang.String datetimeIn) throws java.text.ParseException
java.text.ParseException
public static double minuteInHour()
public static double secondInMinute(java.lang.String datetimeIn) throws java.text.ParseException
java.text.ParseException
public static double secondInMinute()
public static XObject leapYear(java.lang.String datetimeIn) throws java.text.ParseException
java.text.ParseException
public static boolean leapYear()
public static java.lang.String monthName(java.lang.String datetimeIn) throws java.text.ParseException
java.text.ParseException
public static java.lang.String monthName()
public static java.lang.String monthAbbreviation(java.lang.String datetimeIn) throws java.text.ParseException
java.text.ParseException
public static java.lang.String monthAbbreviation()
public static java.lang.String dayName(java.lang.String datetimeIn) throws java.text.ParseException
java.text.ParseException
public static java.lang.String dayName()
public static java.lang.String dayAbbreviation(java.lang.String datetimeIn) throws java.text.ParseException
java.text.ParseException
public static java.lang.String dayAbbreviation()
public static java.lang.String formatDate(java.lang.String dateTime, java.lang.String pattern)
The first argument to date:format-date specifies the date/time to be formatted. It must be right or left-truncated date/time strings in one of the formats defined in [XML Schema Part 2: Datatypes]. The permitted formats are as follows:
If the date/time format is right-truncated (i.e. in a format other than xs:time, or xs:dateTime) then any missing components are assumed to be as follows: if no month is specified, it is given a month of 01; if no day is specified, it is given a day of 01; if no time is specified, it is given a time of 00:00:00.
If the date/time format is left-truncated (i.e. xs:time, xs:gMonthDay, xs:gMonth or xs:gDay) and the format pattern has a token that uses a component that is missing from the date/time format used, then that token is replaced with an empty string ('') within the result. The author is Helg Bredow (helg.bredow@kalido.com)
Copyright ? 2014 Apache XML Project. All Rights Reserved.