Module: OpenHAB::DSL::MonkeyPatch::JavaExtensions::TimeExtensions
- Included in:
- LocalTimeExtensions, ZonedDateTimeExtensions
- Defined in:
- lib/openhab/dsl/monkey_patch/java/time_extensions.rb
Overview
Common extensions to Java date/time classes
Instance Method Summary collapse
-
#+(other) ⇒ ZonedDateTime
Add other TemporalAmount or Duration object.
-
#-(other) ⇒ ZonedDateTime
Subtract other TemporalAmount or Duration object.
-
#<=>(other) ⇒ Integer
Compare against another time object.
Instance Method Details
#+(other) ⇒ ZonedDateTime
Add other TemporalAmount or Duration object
18 19 20 |
# File 'lib/openhab/dsl/monkey_patch/java/time_extensions.rb', line 18 def +(other) plus(other) end |
#-(other) ⇒ ZonedDateTime
Subtract other TemporalAmount or Duration object
29 30 31 |
# File 'lib/openhab/dsl/monkey_patch/java/time_extensions.rb', line 29 def -(other) minus(other) end |
#<=>(other) ⇒ Integer
Compare against another time object
41 42 43 44 45 |
# File 'lib/openhab/dsl/monkey_patch/java/time_extensions.rb', line 41 def <=>(other) compare_to(other) rescue StandardError nil end |