current-dateTime

current-dateTime — Resolves to a formatted date/time string.

Processing instruction:
current-dateTime

Description

The current-dateTime processing instruction will be replaced by a formatted date and time. The date and time is controlled by three pseudo-attributes:

dateTime

The ISO 8601 date or date/time to format. If not specified, defaults to the current date/time. If a date (and not a date/time) is specified, a default time of noon is assumed.

offset

An ISO 8601 day/time duration or year/month duration. This value will be added to the dateTime that is to be formatted.

format

The format string to use. If not specified, the $date-dateTime-format is used.

For example:

  |<para>Published on
  |<?current-dateTime format="[F]"?>.</para>

Will render like this:

Published on Sunday.