ePages 6.17.13 - DE_EPAGES/TLE/API/DateTimeFormatter.pm

Package DE_EPAGES::TLE::API::DateTimeFormatter

TLE format handler date and time issues. The TLE-Variable #INPUT.Locale must exist. This handler supports the following formats:

This handler supports the following tle variables: This handler supports the following tle functions: The default locale for the language and format of the date/time representation is taken from the TLE variable #INPUT.Locale. You can override the locale by setting the TLE variable #DateTimeLocaleID

Example
#CreationDate[date] => 25/05/2010
#Now[datetime:long] => Tuesday, 25 May 2010
#DAY(#Now).#MONTH(#Now).#YEAR(#Now)  => 1.12.2005
#LOCAL("DateTimeLocaleID", "en_US")#Now[datetime:long]#ENDLOCAL => 01.12.2005 11:31:01

Functions

DAY
LocaleRFC3066
MONTH
YMD

DAY

Returns the day of the month (1..31) of a date.

Syntax
#DAY(#DateTime)
Example
#DAY(#CreationDate)
Input
#DateTime (DateTime)
date time

LocaleRFC3066

Converts the locale id with underscore to the representation with dash, e.g. "en_GB" -> "en-gb".

Syntax
#LocaleRFC3066(#LocaleID)
Example
#LocaleRFC3066("de_DE")
Input
#LocaleID (string)
locale id

MONTH

Returns the month (1..12) of a date.

Syntax
#MONTH(#DateTime)
Example
#MONTH(#CreationDate)
Input
#DateTime (DateTime)
date time

YMD

Returns a string representation of (2007-12-31) of a datetime object.

Syntax
#YMD(#DateTime)
Example
#YMD(#CreationDate)
Input
#DateTime (DateTime)
date time