Module: Humanoid::Extensions::Date::Conversions

Included in:
Date
Defined in:
lib/humanoid/extensions/date/conversions.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#get(value) ⇒ Object



9
10
11
# File 'lib/humanoid/extensions/date/conversions.rb', line 9

def get(value)
  value ? value.getlocal.to_date : value
end

#set(value) ⇒ Object



6
7
8
# File 'lib/humanoid/extensions/date/conversions.rb', line 6

def set(value)
  value.to_date.at_midnight.to_time unless value.blank?
end