Class: Jschematic::Attributes::Format::DateTime
- Inherits:
-
Object
- Object
- Jschematic::Attributes::Format::DateTime
- Includes:
- Element
- Defined in:
- lib/jschematic/attributes/format.rb
Instance Attribute Summary
Attributes included from Element
Instance Method Summary collapse
Methods included from Element
#required?, #schema_for, #title, #to_s
Instance Method Details
#accepts?(date_time) ⇒ Boolean
61 62 63 64 65 |
# File 'lib/jschematic/attributes/format.rb', line 61 def accepts?(date_time) ::DateTime.strptime(date_time) rescue ArgumentError false end |