Module: Dsu::Support::TimeComparable
- Included in:
- Models::EntryGroup
- Defined in:
- lib/dsu/support/time_comparable.rb
Constant Summary collapse
- TIME_COMPARABLE_FORMAT_SPECIFIER =
'%Y%m%d'
Instance Method Summary collapse
Instance Method Details
#time_equal?(other_time:) ⇒ Boolean
8 9 10 |
# File 'lib/dsu/support/time_comparable.rb', line 8 def time_equal?(other_time:) time_equal_compare_string_for(time: time) == time_equal_compare_string_for(time: other_time) end |
#time_equal_compare_string_for(time:) ⇒ Object
12 13 14 15 16 |
# File 'lib/dsu/support/time_comparable.rb', line 12 def time_equal_compare_string_for(time:) time = time.in_time_zone time.strftime(TIME_COMPARABLE_FORMAT_SPECIFIER) end |