See: samsonjs/strftime
Modifier | Description |
---|---|
A |
Full weekday name. |
a |
Abbreviated weekday name. |
B |
Full month name. |
b |
Abbreviated month name. |
C |
AD century (year/100), padded to 2-digits. |
c |
Equivalent to %a %b %d %X %Y %Z in en_US (based on locale). |
D |
Equivalent to %m/%d/%y in en_US (based on locale). |
d |
Day of the month, padded to 2-digits (01 -31 ). |
e |
Day of the month, padded with a leading space for single digit values (1 -31 ). |
F |
Equivalent to %Y-%m-%d in en_US (based on locale). |
H |
The hour (24-hour clock), padded to 2-digits (00 -23 ). |
h |
The same as %b (abbreviated month name). |
I |
The hour (12-hour clock), padded to 2-digits (01 -12 ). |
j |
Day of the year, padded to 3-digits (001 -366 ). |
k |
The hour (24-hour clock), padded with a leading space for single digit values (0 -23 ). |
L |
The milliseconds, padded to 3-digits (Ruby extension)`. |
l |
The hour (12-hour clock), padded with a leading space for single digit values (1 -12 ). |
M |
The minute, padded to 2-digits (00 -59 ). |
m |
The month, padded to 2-digits (01 -12 ). |
n |
Newline character. |
o |
Day of the month as an ordinal (without padding), e.g. 1st, 2nd, 3rd, 4th, .... |
P |
am or pm in lowercase (Ruby extension, based on locale). |
p |
AM or PM (based on locale). |
R |
Equivalent to %H:%M in en_US (based on locale). |
r |
Equivalent to %I:%M:%S %p in en_US (based on locale). |
S |
The second, padded to 2-digits (00 -60 ). |
s |
The number of seconds since the Epoch, UTC . |
T |
Equivalent to %H:%M:%S in en_US (based on locale). |
t |
Tab character. |
U |
Week number of the year, Sunday as the first day of the week, padded to 2-digits (00 -53 ). |
u |
The weekday, Monday as the first day of the week (1 -7 ). |
v |
Equivalent to %e-%b-%Y in en_US (based on locale). |
W |
Week number of the year, Monday as the first day of the week, padded to 2-digits (00 -53 ). |
w |
The weekday, Sunday as the first day of the week (0 -6 ). |
X |
Equivalent to %D in en_US (based on locale). |
x |
Equivalent to %T in en_US (based on locale). |
Y |
The year with the century. |
y |
The year without the century (00 -99 ). |
Z |
The time zone name, replaced with an empty string if it is not found. |
z |
The time zone offset from UTC , with a leading plus sign for UTC and zones east of UTC and a minus sign for those west of UTC , hours and minutes follow each padded to 2-digits and with no delimiter between them. |
See: samsonjs/strftime
A
a
B
b
C
c
%a %b %d %X %Y %Z
inen_US
(based on locale).D
%m/%d/%y
inen_US
(based on locale).d
01
-31
).e
1
-31
).F
%Y-%m-%d
inen_US
(based on locale).H
00
-23
).h
%b
(abbreviated month name).I
01
-12
).j
001
-366
).k
0
-23
).L
l
1
-12
).M
00
-59
).m
01
-12
).n
o
P
am
orpm
in lowercase (Ruby extension, based on locale).p
AM
orPM
(based on locale).R
%H:%M
inen_US
(based on locale).r
%I:%M:%S %p
inen_US
(based on locale).S
00
-60
).s
UTC
.T
%H:%M:%S
inen_US
(based on locale).t
U
00
-53
).u
1
-7
).v
%e-%b-%Y
inen_US
(based on locale).W
00
-53
).w
0
-6
).X
%D
inen_US
(based on locale).x
%T
inen_US
(based on locale).Y
y
00
-99
).Z
z
UTC
, with a leading plus sign forUTC
and zones east ofUTC
and a minus sign for those west ofUTC
, hours and minutes follow each padded to 2-digits and with no delimiter between them.