functx:next-day
The next day
Description
The functx:next-day function takes a date and returns a date representing the following day.
The $date argument must be castable to xs:date, meaning that it must have the type xs:date or xs:dateTime, or be an xs:string or untyped value of the form YYYY-MM-DD.
Parameters |
Description |
|---|---|
date:date() |
the date |
Examples
XPath |
Results |
|---|---|
functx:next-day(xs:date('2004-01-23')) |
2004-01-24 |
functx:next-day(xs:dateTime('2005-12-31T12:00:13')) |
2006-01-01 |
In a generator
Copy the snippet below and paste it in Freemapper, under a language node inside the generators element. Each line of the pattern prints the result of one example; to see them, run mi generate <project> <language> example-functx-next-day.
[e] example-functx-next-day
[e] start
[e] match
[v] /
[e] body
[e] write-pattern
[v] examples
[e] patterns
[e] examples
[v] E01: {{ functx:next-day(xs:date('2004-01-23')) }}
[v] E02: {{ functx:next-day(xs:dateTime('2005-12-31T12:00:13')) }}