public class ExsltDatetime extends Object
xmlns:datetime="http://exslt.org/dates-and-times"The documentation for each function has been copied from the relevant EXSLT Implementer page.
Constructor and Description |
---|
ExsltDatetime() |
Modifier and Type | Method and Description |
---|---|
static String |
date()
See above.
|
static String |
date(String datetimeIn)
The date:date function returns the date specified in the date/time string given
as the argument.
|
static String |
dateTime()
The date:date-time function returns the current date and time as a date/time string.
|
static String |
dayAbbreviation()
See above.
|
static String |
dayAbbreviation(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(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(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(String datetimeIn)
The date:day-in-year function returns the day of a date in a year
as a number.
|
static String |
dayName()
See above.
|
static String |
dayName(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(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.
|
static String |
formatDate(String dateTime,
String pattern)
The date:format-date function formats a date/time according to a pattern.
|
static double |
hourInDay()
See above.
|
static double |
hourInDay(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(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(String datetimeIn)
The date:minute-in-hour function returns the minute of the hour
as a number.
|
static String |
monthAbbreviation()
See above.
|
static String |
monthAbbreviation(String datetimeIn)
The date:month-abbreviation function returns the abbreviation of the month of
a date.
|
static double |
monthInYear()
See above.
|
static double |
monthInYear(String datetimeIn)
The date:month-in-year function returns the month of a date as a number.
|
static String |
monthName()
See above.
|
static String |
monthName(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(String datetimeIn)
The date:second-in-minute function returns the second of the minute
as a number.
|
static String |
time()
See above.
|
static String |
time(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(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(String datetimeIn)
The date:year function returns the year of a date as a number.
|
public static String dateTime()
public static String date(String datetimeIn) throws ParseException
ParseException
public static String date()
public static String time(String timeIn) throws ParseException
ParseException
public static String time()
public static double year(String datetimeIn) throws ParseException
ParseException
public static double year()
public static double monthInYear(String datetimeIn) throws ParseException
ParseException
public static double monthInYear()
public static double weekInYear(String datetimeIn) throws ParseException
ParseException
public static double weekInYear()
public static double dayInYear(String datetimeIn) throws ParseException
ParseException
public static double dayInYear()
public static double dayInMonth(String datetimeIn) throws ParseException
ParseException
public static double dayInMonth()
public static double dayOfWeekInMonth(String datetimeIn) throws ParseException
ParseException
public static double dayOfWeekInMonth()
public static double dayInWeek(String datetimeIn) throws ParseException
ParseException
public static double dayInWeek()
public static double hourInDay(String datetimeIn) throws ParseException
ParseException
public static double hourInDay()
public static double minuteInHour(String datetimeIn) throws ParseException
ParseException
public static double minuteInHour()
public static double secondInMinute(String datetimeIn) throws ParseException
ParseException
public static double secondInMinute()
public static XObject leapYear(String datetimeIn) throws ParseException
ParseException
public static boolean leapYear()
public static String monthName(String datetimeIn) throws ParseException
ParseException
public static String monthName()
public static String monthAbbreviation(String datetimeIn) throws ParseException
ParseException
public static String monthAbbreviation()
public static String dayName(String datetimeIn) throws ParseException
ParseException
public static String dayName()
public static String dayAbbreviation(String datetimeIn) throws ParseException
ParseException
public static String dayAbbreviation()
public static String formatDate(String dateTime, 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 © 2012 JBoss by Red Hat. All Rights Reserved.