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:
- [date] - display only the date part
- [time] - display only the time part
- [datetime] - display date and time
- #Now - DateTime object of current date
- #Timestamp - seconds since 1.1.1970 0:00 GMT
- YEAR - extract the year (e.g. 2004) of a DateTime object
- MONTH - extract the month (1..12) of a DateTime object
- DAY - extract the day (1..31) of a DateTime object
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
Returns the day of the month (1..31) of a date.
Syntax |
#DAY(#DateTime) |
Example |
#DAY(#CreationDate) |
Input |
|
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 |
|
MONTH
Returns the month (1..12) of a date.
Syntax |
#MONTH(#DateTime) |
Example |
#MONTH(#CreationDate) |
Input |
|
YMD
Returns a string representation of (2007-12-31) of a datetime object.
Syntax |
#YMD(#DateTime) |
Example |
#YMD(#CreationDate) |
Input |
|