Skip to content

Instantly share code, notes, and snippets.

@mattantonelli
Created March 12, 2015 19:30
Show Gist options
  • Select an option

  • Save mattantonelli/e61939812dab709e40d8 to your computer and use it in GitHub Desktop.

Select an option

Save mattantonelli/e61939812dab709e40d8 to your computer and use it in GitHub Desktop.
# Check a valid date string to match the format 'YYYY-MM-DD'
def valid_date?(date)
Date.valid_date?(*date.split('-').map(&:to_i))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment