Skip to content

Instantly share code, notes, and snippets.

@5minpause
Created July 3, 2012 16:06
Show Gist options
  • Save 5minpause/3040692 to your computer and use it in GitHub Desktop.
Save 5minpause/3040692 to your computer and use it in GitHub Desktop.
Extension for jekyll to format date as rfc822
# Format a date in rfc822 format e.g. "Wed, 02 Oct 2002 15:00:00 +0200"
#
# date - The Time to format.
#
# Returns the formatted String.
def date_to_rfc822(date)
date.strftime("%a, %d %b %Y %H:%M:%S %z")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment