EXSLT Dates and Times module

The supported extension functions that are included in the EXSLT Dates and Times module.

The following table lists the supported functions in the EXSLT Dates and Times module.

The EXSLT Dates and Times extensions require the following namespace declaration.
xmlns:date="http://exslt.org/dates-and-times"
Table 1. Supported functions for the EXSLT Dates and Times module
Name Element or function Supported
date:add() Function Yes
date:add-duration() Function Yes
date:date() Function Yes
date:date-format Element No
date:date-time() Function Yes
date:day-abbreviation() Function Yes
date:day-in-month() Function Yes
date:day-in-week() Function Yes
date:day-in-year()date:day-in-year() Function Yes
date:day-name() Function Yes
date:day-of-week-in-month() Function Yes
date:difference() Function Yes
date:duration() Function Yes
date:format-date() Function Yes
date:hour-in-day() Function Yes
date:leap-year() Function Yes
date:minute-in-hour() Function Yes
date:month-abbreviation() Function Yes
date:month-in-year() Function Yes
date:month-name() Function Yes
date:parse-date() Function No
date:second-in-minute() Function Yes
date:seconds() Function Yes
date:sum() Function Yes
date:time() Function Yes
date:week-in-month() Function Yes
date:week-in-year() Function Yes
date:year() Function Yes

date:add()

The date:add() extension returns the dateTime from adding a duration to a dateTime.

Syntax
date:add(dateTime, duration)

date:add-duration()

The date:add-duration() extension returns the duration from adding two durations.

Syntax
date:add-duration(duration1, duration2)

date:date()

The date:date() extension returns the date from the input dateTime string.

Syntax
date:date(dateTime)

date:date-time()

The date:date-time() extension returns the current date and time as a dateTime string.

Syntax
date:date-time()

date:day-abbreviation()

The date:day-abbreviation() extension returns the abbreviation of the day of the week from the input string.

Syntax
date:day-abbreviation(dateTime)

date:day-in-month()

The date:day-in-month() extension returns the day of the month from the input string.

Syntax
date:day-in-month(dateTime)

date:day-in-week()

The date:day-in-week() extension returns the day of the week from the input string.

Syntax
date:day-in-week(dateTime)

date:day-in-year()

The date:day-in-year() extension returns the day of the year from the input string.

Syntax
date:day-in-year(dateTime)

date:day-name()

The date:day-name() extension returns the full name of the day of the week from the input string.

Syntax
date:day-name(dateTime)

date:day-of-week-in-month()

The date:day-of-week-in-month() extension returns the day of the week in a month as a number.

Syntax
date:day-of-week-in-month(dateTime)

date:difference()

The date:difference() extension returns the duration between the first date and the second date.

Syntax
date:difference(start-dateTime, end-dateTime)

date:duration()

The date:duration() extension converts an input number of seconds to a duration string.

Syntax
date:duration(duration)

date:format-date()

The date:format-date() extension formats the specified date in the first string with the pattern in the second string.

Syntax
date:format-date(string1, string2)

date:hour-in-day()

The date:hour-in-day() extension returns the hour of the day from the input string.

Syntax
date:hour-in-day(dateTime)

date:leap-year()

The date:leap-year() extension tests an input year to determine whether it is a leap year.

Syntax
date:leap-year(dateTime)

date:minute-in-hour()

The date:minute-in-hour() extension returns the minute of the hour from the input string.

Syntax
date:minute-in-hour(dateTime)

date:month-abbreviation()

The date:month-abbreviation() extension returns the abbreviation of the month of the year from the input string.

Syntax
date:month-abbreviation(dateTime)

date:month-in-year()

The date:month-in-year() extension returns the month of the year from the input string.

Syntax
date:month-in-year(dateTime)

date:month-name()

The date:month-name() extension returns the name of the month of the year from the input string.

Syntax
date:month-name(dateTime)

date:second-in-minute()

The date:second-in-minute() extension returns the second of the minute from the input string.

Syntax
date:second-in-minute(dateTime)

date:seconds()

The date:seconds() extension converts an input string to seconds.

Syntax
date:seconds(dateTime)

date:seconds(duration)

date:sum()

The date:sum() extension adds a set of durations.

Syntax
sum(nodeset)

date:time()

The date:time() extension returns the time of day from the input string.

Syntax
date:time(dateTime)

date:week-in-month()

The date:week-in-month() extension returns the week of the month from the input string.

Syntax
date:week-in-month(dateTime)

date:week-in-year()

The date:week-in-year() extension returns the week of the year from the input string.

Syntax
date:week-in-year(dateTime)

date:year()

The date:year() extension extracts the year from the input string.

Syntax
date:year(dateTime)