method
valid_date?
v3.0.9 -
Show latest stable
- Class:
ActiveSupport::JSON::Backends::Yaml
valid_date?(date_string)private
No documentation available.
# File activesupport/lib/active_support/json/backends/yaml.rb, line 95
def valid_date?(date_string)
begin
date_string =~ DATE_REGEX && DateTime.parse(date_string)
rescue ArgumentError
false
end
end