Supported Specifiers

Unsupported specifiers are rendered without the percent sign.
e.g. %q becomes q. Use %% to get a literal % sign.

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

D: equivalent to %m/%d/%y

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

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]

p: "AM" or "PM"

R: equivalent to %H:%M

r: equivalent to %I:%M:%S %p

S: the second, padded to 2 digits (00-60)

s: the number of seconds since the Epoch, UTC

T: equivalent to %H:%M:%S

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

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)

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

For more detail see man 3 strftime as the format specifiers should behave
identically. If behaviour differs please file a bug.

Any specifier can be modified with -, _, or 0 as well, as in Ruby.
Using %- will omit any leading zeroes or spaces, %_ will force spaces
for padding instead of the default, and %0 will force zeroes for padding.
There's some redundancy here as %-d and %e have the same result, but it
solves some awkwardness with formats like %l.