Class: DateTime

Inherits:
Object
  • Object
show all
Includes:
Sequent::Test::DateTimePatches::Compare, Sequent::Test::DateTimePatches::Normalize
Defined in:
lib/sequent/core/ext/ext.rb,
lib/sequent/test/time_comparison.rb

Class Method Summary collapse

Methods included from Sequent::Test::DateTimePatches::Normalize

#normalize

Methods included from Sequent::Test::DateTimePatches::Compare

#<=>, #___<=>

Class Method Details

.deserialize_from_json(value) ⇒ Object



66
67
68
# File 'lib/sequent/core/ext/ext.rb', line 66

def self.deserialize_from_json(value)
  value.blank? ? nil : DateTime.iso8601(value.dup)
end

.from_params(value) ⇒ Object



60
61
62
63
64
# File 'lib/sequent/core/ext/ext.rb', line 60

def self.from_params(value)
  value.blank? ? nil : DateTime.iso8601(value.dup)
rescue ArgumentError
  value
end