Module: OpenHAB::CoreExt::Java::TemporalAmount

Included in:
Duration, Period
Defined in:
lib/openhab/core_ext/java/temporal_amount.rb

Overview

Instance Method Summary collapse

Instance Method Details

#-@TemporalAmount

Returns:



23
24
25
# File 'lib/openhab/core_ext/java/temporal_amount.rb', line 23

def -@
  negated
end

#agoZonedDateTime

Subtract self to ZonedDateTime.now

Returns:



12
13
14
# File 'lib/openhab/core_ext/java/temporal_amount.rb', line 12

def ago
  ZonedDateTime.now - self
end

#from_nowZonedDateTime

Add self to ZonedDateTime.now

Returns:



18
19
20
# File 'lib/openhab/core_ext/java/temporal_amount.rb', line 18

def from_now
  ZonedDateTime.now + self
end

#inspectString

Returns:

  • (String)


28
29
30
# File 'lib/openhab/core_ext/java/temporal_amount.rb', line 28

def inspect
  to_s
end