Skip to main content

Masks (Display Templates)

The following table lists the mask attributes available when performing date and time mainpulation within the client display templates (in Application Builder).

Examples

# Mask          # Comments
Y-m-d 2007-01-10
F j, Y, g:i a January 10, 2007, 3:05 pm
l, \\t\\he jS \\of F Y h:i:s A Wednesday, the 10th of January 2007 03:05:01 PM

Complete List

MaskMeaningExample
dDay of the month, 2 digits with leading zeros01 to 31
DA short textual representation of the day of the weekMon to Sun
jDay of the month without leading zeros1 to 31
lA full textual representation of the day of the weekSunday to Saturday
NISO-8601 numeric representation of the day of the week(for Monday) through 7 (for Sunday)
SEnglish ordinal suffix for the day of the month, 2 charactersst, nd, rd or th. Works well with j
wNumeric representation of the day of the week0 (for Sunday) to 6 (for Saturday)
zThe day of the year (starting from 0)0 to 364 (365 in leap years)
WISO-8601 week number of year, weeks starting on Monday01 to 53
FA full textual representation of a month, such as January or MarchJanuary to December
mNumeric representation of a month, with leading zeros01 to 12
MA short textual representation of a monthJan to Dec
nNumeric representation of a month, without leading zeros1 to 12
tNumber of days in the given month28 to 31
LWhether it's a leap year1 if it is a leap year, 0 otherwise
oISO-8601 year number (identical to (Y), but if the ISO week number (W) belongs to the previous or next year, that year is used instead)Examples: 1998 or 2004
YA full numeric representation of a year, 4 digitsExamples: 1999 or 2003
yA two digit representation of a yearExamples: 99 or 03
aLowercase Ante meridiem and Post meridiemam or pm
AUppercase Ante meridiem and Post meridiemAM or PM
g12-hour format of an hour without leading zeros1 to 12
G24-hour format of an hour without leading zeros0 to 23
h12-hour format of an hour with leading zeros01 to 12
H24-hour format of an hour with leading zeros00 to 23
iMinutes, with leading zeros00 to 59
sSeconds, with leading zeros00 to 59
uDecimal fraction of a second (minimum 1 digit, arbitrary number of digits allowed)001 (i.e. 0.001s), 999 (i.e. 0.999s), 999876543210 (i.e. 0.999876543210s)
ODifference to Greenwich time (GMT) in hours and minutesExample: +1030
PDifference to Greenwich time (GMT) with colon between hours and minutesExample: -08:00
TTimezone abbreviation of the machine running the codeExamples: EST, MDT, PDT
ZTimezone offset in seconds (negative if west of UTC, positive if east)-43200 to 50400
cISO 8601 date represented as the local time with an offset to UTC appended(1)1997-05-16T19:23:30,12345-0400
CAn ISO date string as implemented by the native Date object1962-06-17T09:21:34.125Z
USeconds since the Unix Epoch (January 1 1970 00:00:00 GMT)1193432466 or -2138434463
MSMicrosoft AJAX serialized dates/Date(1238606590509)/ (i.e. UTC milliseconds since epoch)
timeA javascript millisecond timestamp1350024476440
timestampA UNIX timestamp (same as U)1350024866

(1) Notes:
1: If unspecified, the month / day defaults to the current month / day, the time defaults to midnight, while the timezone defaults to the browser's timezone. If a time is specified, it must include both hours and minutes. The "T" delimiter, seconds, milliseconds and timezone are optional.
2: The decimal fraction of a second, if specified, must contain at least 1 digit (there is no limit to the maximum numberof digits allowed), and may be delimited by either a '.' or a ','