(lowercase L) Full textual representation of a day of the week
Monday through
Sunday **
N
ISO-8601 numeric representation of the day of the week
1 through 7
(mon=1)
S
English ordinal suffix for the day of the month
st, nd, rd, or th
w
Numeric representation of the weekday
0 (sun) through 6
z
The day of the year (zero index for Jan 1)
0 through 365
Week
Character
Description
Example
W
ISO-8601 week number of year, weeks starting on Monday
Example: 42
(the 42nd week in the year)
Month
Character
Description
Example
m
Numeric representation of a month, with leading zeros
01 through 12
n
Numeric representation of a month, without leading zeros
1 through 12
M
A short textual representation of a month, three letters
Jan through Dec **
F
A full textual representation of a month, such as January or March
January through December
t
The number of days in the given month
28 through 31
Year
Character
Description
Example
Y
a four digit numeric representation of the year
2020 or 1999
y
a two digit numeric representation of the year
20 or 99
L
Whether it is a leap year
1 for leap year,
0 otherwise
o
ISO-8601 week-numbering year. This has the same value as Y, except that if the ISO week number (W) belongs to the previous or next year, that year is used instead.