|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.exslt.Date
public final class Date
This class implements extension functions in the http://exslt.org/dates-and-times namespace.
Method Summary | |
---|---|
static String |
date(String dateTime)
The date:date function returns the date specified in the date/time string given as the argument. |
static String |
date(XPathContext context)
The date:date function returns the current date. |
static String |
dateTime(XPathContext context)
The date:date-time function returns the current date and time as a date/time string. |
static String |
dayAbbreviation(String dateTime)
Return the day of the week given in a date as an English day abbreviation: one of 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', or 'Sat'. |
static String |
dayAbbreviation(XPathContext context)
Return the day of the week given in the current date as an English day abbreviation: one of 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', or 'Sat'. |
static double |
dayInMonth(String dateTime)
Return the day number of a specified date within the month |
static double |
dayInMonth(XPathContext context)
Return the day number of the current date within the month |
static double |
dayInWeek(String dateTime)
Return the day of the week given in a date as a number. |
static double |
dayInWeek(XPathContext context)
Return the day of the week in the current date as a number. |
static double |
dayInYear(String dateTime)
Return the day number of a specified date within the year |
static double |
dayInYear(XPathContext context)
Return the day number of the current date within the year |
static String |
dayName(String dateTime)
Return the day of the week given in a date as an English day name: one of 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday' or 'Friday'. |
static String |
dayName(XPathContext context)
Return the day of the week given in the current date as an English day name: one of 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday' or 'Friday'. |
static double |
dayOfWeekInMonth(String dateTime)
Return the day-of-the-week in a month of a date as a number (for example 3 for the 3rd Tuesday in May). |
static double |
dayOfWeekInMonth(XPathContext context)
Return the day-of-the-week in a month of the current date as a number (for example 3 for the 3rd Tuesday in May). |
static double |
hourInDay(String dateTime)
Return the hour of the day in the specified date or date/time |
static double |
hourInDay(XPathContext context)
Return the current hour of the day |
static boolean |
leapYear(String dateTime)
Return true if the year specified in the date/time string given as the argument is a leap year. |
static boolean |
leapYear(XPathContext context)
Returns true if the current year is a leap year |
static double |
minuteInHour(String dateTime)
Return the minute of the hour in the specified date or date/time |
static double |
minuteInHour(XPathContext context)
Return the current minute of the hour |
static String |
monthAbbreviation(String date)
Return the month abbreviation from a date. |
static String |
monthAbbreviation(XPathContext context)
Return the month abbreviation from the current date. |
static double |
monthInYear(String dateTime)
Return the month number from a date. |
static double |
monthInYear(XPathContext context)
Return the month number from the current date. |
static String |
monthName(String date)
Return the month name from a date. |
static String |
monthName(XPathContext context)
Return the month name from the current date. |
static double |
secondInMinute(String dateTime)
Return the second of the minute in the specified date or date/time |
static double |
secondInMinute(XPathContext context)
Return the current second of the minute |
static String |
time(String dateTime)
The date:time function returns the time specified in the date/time string given as the argument. |
static String |
time(XPathContext context)
The date:time function returns the current time. |
static double |
weekInMonth(String dateTime)
Return the week number of a specified date within the month (Note, this function is underspecified in EXSLT) |
static double |
weekInMonth(XPathContext context)
Return the ISO week number of the current date within the month |
static double |
weekInYear(String dateTime)
Return the ISO week number of a specified date within the year (Note, this returns the ISO week number: the result in EXSLT is underspecified) |
static double |
weekInYear(XPathContext context)
Return the ISO week number of the current date |
static double |
year(String dateTime)
The date:year function returns the year specified in the date/time string given as the argument. |
static double |
year(XPathContext context)
The date:year function returns the current year. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String dateTime(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static String date(String dateTime)
dateTime
- must start with [+|-]CCYY-MM-DD
public static String date(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static String time(String dateTime)
dateTime
- must start with [+|-]CCYY-MM-DDThh:mm:ss
public static String time(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static double year(String dateTime)
dateTime
- must begin with CCYY
public static double year(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static boolean leapYear(String dateTime)
dateTime
- a dateTime as a string
public static boolean leapYear(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static double monthInYear(String dateTime)
dateTime
- a dateTime as a string
public static double monthInYear(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static String monthName(String date)
date
- the date/time as a string
public static String monthName(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static String monthAbbreviation(String date)
date
- The date must start with either "CCYY-MM" or "--MM"
public static String monthAbbreviation(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static double weekInYear(String dateTime)
dateTime
- the current date starting CCYY-MM-DD
public static double weekInYear(XPathContext context) throws XPathException
context
- the XPath dynamic context
(Note, this returns the ISO week number: the result in EXSLT is underspecified)
XPathException
public static double weekInMonth(String dateTime)
dateTime
- the date starting CCYY-MM-DD
public static double weekInMonth(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static double dayInYear(String dateTime)
dateTime
- the date starting with CCYY-MM-DD
public static double dayInYear(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static double dayInMonth(String dateTime)
dateTime
- must start with CCYY-MM-DD, or --MM-DD, or ---DD
public static double dayInMonth(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static double dayOfWeekInMonth(String dateTime)
dateTime
- must start with CCYY-MM-DD
public static double dayOfWeekInMonth(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static double dayInWeek(String dateTime)
dateTime
- must start with CCYY-MM-DD
public static double dayInWeek(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static String dayName(String dateTime)
dateTime
- must start with CCYY-MM-DD
public static String dayName(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static String dayAbbreviation(String dateTime)
dateTime
- must start with CCYY-MM-DD
public static String dayAbbreviation(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static double hourInDay(String dateTime)
dateTime
- must start with CCYY-MM-DDThh:mm:ss or hh:mm:ss
public static double hourInDay(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static double minuteInHour(String dateTime)
dateTime
- must start with CCYY-MM-DDThh:mm:ss or hh:mm:ss
public static double minuteInHour(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public static double secondInMinute(String dateTime)
dateTime
- must start with CCYY-MM-DDThh:mm:ss or hh:mm:ss
public static double secondInMinute(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |