Module: Utopia::Extensions::TimeDateComparison
- Defined in:
- lib/utopia/extensions/date_comparisons.rb
Overview
Provides comparison operator extensions.
Instance Method Summary collapse
Instance Method Details
#<=>(other) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/utopia/extensions/date_comparisons.rb', line 12 def <=>(other) if Date === other or DateTime === other self.to_datetime <=> other else super end end |