Every time I need to format ruby’s strftime options, I need to search for it on the internet. Putting them down here so that I don’t have to do that again!

Date Formatting 1

%YYear with century (e.g. 2015, 1995, etc)
%mMonth of the year, zero-padded (01..12)
%BThe full month name (e.g. January)
%bThe abbreviated month name (e.g. Jan)
%dDay of the month, zero-padded (01..31)
%jDay of the year (001..366)


Don’t pad a numerical output
_Use spaced for padding
0Use zeros for padding
^Upcase the result string
#Change case
:Use colons for %z
Continue reading