Class: Jschematic::Attributes::Format::DateTime
- Inherits:
-
Object
- Object
- Jschematic::Attributes::Format::DateTime
show all
- Includes:
- Element
- Defined in:
- lib/jschematic/attributes/format.rb
Instance Attribute Summary
Attributes included from Element
#id, #parent
Instance Method Summary
collapse
Methods included from Element
#required?, #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
|