You can format a date in Ruby using the strftime method.
Here's an example of how to format October 13, 2014, into the format "October 13, 2014":
main.rb117 chars4 lines
In the strftime method, %B represents the full month name, %d represents the day of the month with a zero-padded two-digit number, and %Y represents the year with century.
gistlibby LogSnag