Skip to content

Instantly share code, notes, and snippets.

@Mikr0Tik
Created March 5, 2010 10:34
Show Gist options
  • Save Mikr0Tik/322627 to your computer and use it in GitHub Desktop.
Save Mikr0Tik/322627 to your computer and use it in GitHub Desktop.
user_input_date =~ /^[0-9]{8}$/
user_input_date = Date.strptime("#{user_input_date[0..1]}.#{user_input_date[2..3]}.#{user_input_date[4..7]}", "%d.%m.%Y")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment