Created
July 3, 2012 16:06
-
-
Save 5minpause/3040692 to your computer and use it in GitHub Desktop.
Extension for jekyll to format date as rfc822
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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