Class: Unit::Types::DateTime
- Inherits:
-
Object
- Object
- Unit::Types::DateTime
- Defined in:
- lib/unit-ruby/types/date_time.rb
Class Method Summary collapse
Class Method Details
.cast(value) ⇒ Object
4 5 6 7 8 |
# File 'lib/unit-ruby/types/date_time.rb', line 4 def self.cast(value) return nil if value.nil? ::DateTime.parse(value).iso8601 end |