Skip to content

Instantly share code, notes, and snippets.

@marioaquino
Created April 11, 2009 12:08
Show Gist options
  • Save marioaquino/93540 to your computer and use it in GitHub Desktop.
Save marioaquino/93540 to your computer and use it in GitHub Desktop.
require 'date'
s = '2998-12-31'
date = Date.parse(s)
f = date.strftime('%d-%b-%G')
puts f #=> 31-Dec-2999 ... Why?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment