method

valid_date?

rails latest stable - Class: ActiveSupport::JSON::Backends::Yaml

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.0.9) is shown here.

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