Formatting

Formatting your date/time uses special tokens inside a string. The following are the tokens allowed and their meaning.

u
Unix timestamp (seconds)
yy
Two digit year
yyyy
Four digit year
M
Month with no leading 0
MM
Month with leading 0
MMM
Month name abbreviation as defined in i18n
MMMM
Month name as defined in i18n
d
Day with no leading 0
dd
Day with leading 0
ddd
Day name abbreviation as defined in i18n
dddd
Day name as defined in i18n
HH
Hour with leading 0 (24 hour)
h
Hour with no leading 0 (12 hour)
hh
Hour with leading 0 (12 hour)
m
Minute with no leading 0
mm
Minute with leading 0
s
Second with no leading 0
ss
Second with leading 0
l
Milliseconds always with leading 0
c
Microseconds always with leading 0
t
a or p for AM/PM
T
A or P for AM/PM
tt
am or pm for AM/PM
TT
AM or PM for AM/PM
z
Timezone as defined by timezoneList
zz
Timezone as defined by timezoneList, but in Iso 8601 format (+04:45)
zzz
Timezone as defined by i18n timezone names. (You must define these)
'...'
Literal text (Uses single quotes)