integrator.io uses the moment.js JavaScript library to handle time and date formatting. The following table lists all available codes:
Note
Results are based on the following timeStamp: 2020-07-09T19:59:39.156Z
Category |
Token |
Description |
Handlebars expression |
Result |
---|---|---|---|---|
Month |
M |
1 through 12 no padding (no leading "0") |
|
7 |
Mo |
1st through 12th no padding + ordinal (th, st, etc.) |
|
7th |
|
MM |
01 through 12 two digit |
|
07 |
|
MMM |
Jan through Dec Three letter abbreviation |
|
Jul |
|
MMMM |
January through December Full month name |
|
July |
|
Quarter |
Q |
1 through 4 Quarter Year: quarter |
|
3 |
Qo |
1st through 4th Quarter + ordinal. |
|
3rd |
|
Day of month |
D |
1 through 31 no padding |
|
9 |
Do |
1st through 31st no padding + ordinal |
|
9th |
|
DD |
01 through 31 2 digit (will have a leading "0" for first nine days) |
|
09 |
|
Day of year |
DDD |
1 through 365 no padding (no leading "0") |
|
191 |
DDDo |
1st through 365th no padding + ordinal |
|
191st |
|
DDDD |
001 through 365 3 digit (will have leading "0s" for 1st-99th) |
|
191 |
|
Day of week |
d |
0 through 6 no padding |
|
4 |
do |
0th through 6th no padding + ordinal |
|
4th |
|
dd |
Su through Sa 2 letter abbreviation |
|
Th |
|
ddd |
Sun through Sat 3 letter abbreviation |
|
Thu |
|
dddd |
Sunday through Saturday full day name |
|
Thursday |
|
Day of week (locale) |
e |
0 through 6 This allows you to set the first day of the week if Sunday (default) is not preferred. |
|
4 |
Day of week (ISO) |
E |
1 through 7 This is eliminates the zero-based default. |
|
4 |
Week of year |
w |
1 through 53 no padding |
|
28 |
wo |
1st through 53rd no padding + ordinal |
|
28th |
|
ww |
01 through 53 2 digit (leading "0" for weeks 1 through 9) |
|
28 |
|
Year |
YY |
2 digit |
|
20 |
YYYY |
4 digit |
|
2020 |
|
Y |
4 digit (complies with ISO 8601 standard for dates past the year 9999) |
|
2020 |
|
Week year |
gg |
2 digits |
|
20 |
gggg |
4 digits |
|
2020 |
|
Week year (ISO) |
GG |
2 digits |
|
20 |
GGGG |
4 digits |
|
2020 |
|
AM/PM |
A |
AM PM (uppercase) |
|
PM |
a |
am pm (lowercase) |
|
pm |
|
Hour |
H |
no padding 24 hour clock (0-23) |
|
19 |
HH |
2 digits 24 hour clock (00-23) |
|
19 |
|
h |
no padding 12 hour clock (1-12) |
|
7 |
|
hh |
2 digits 12 hour clock (01-12) |
|
07 |
|
k |
no padding 24 hour clock (1-24) |
|
19 |
|
kk |
2 digit 24 hour clock (01-24) |
|
29 |
|
Minute |
m |
no padding |
|
59 |
mm |
2 digits (leading "0" for 1-9). |
|
59 |
|
Second |
s |
no padding |
|
39 |
ss |
2 digits (leading "0" for 1-9) |
|
39 |
|
Fractional second |
S |
1 digit (no padding) |
|
1 |
SS |
2 digits (00-99) |
|
16 |
|
SSS |
3 digits (000-999) |
|
161 |
|
SSSS through SSSSSSSSS |
Additional "S" will pad the fractional seconds with trailing zeroes. |
|
1610 ... 161000000 |
|
Time zone offset |
Z |
colon separated |
|
+00:00 |
ZZ |
no colon |
|
+0000 |
|
Unix timestamp |
X |
standard |
|
1594324779 |
Unix millisecond timestamp |
x |
Unix timestamp with milliseconds |
|
1594324779162 |
Localized formats |
LT |
Time: 8:30 PM |
|
7:59 PM |
LTS |
Time with seconds: 8:30:33 PM |
|
7:59:39 PM |
|
L |
09/04/2020 |
|
07/09/2020 |
|
l |
9/4/2020 |
|
7/9/2020 |
|
LL |
September 4, 1986 |
|
July 9, 2020 |
|
ll |
Sep 4, 1986 |
|
Jul 9, 2020 |
|
LLL |
September 4, 1986 8:30 PM |
|
July 9, 2020 7:59 PM |
|
lll |
Sep 4, 1986 8:30 PM |
|
Jul 9, 2020 7:59 PM |
|
LLLL |
Thursday, September 4, 1986 8:30 PM |
|
Thursday, July 9, 2020 7:59 PM |
|
llll |
Thu, Sep 4, 1986 8:30 PM |
|
Thu, Jul 9, 2020 7:59 PM |
|
Square brackets |
[some text] |
add characters |
|
2020-07-09 Have Fun! |
Comments
Please sign in to leave a comment.