Class: Daru::Offsets::Hour

Inherits:
Tick show all
Defined in:
lib/daru/date_time/offsets.rb

Overview

Create an hours offset

Examples:

Create a Hour offset

offset = Daru::Offsets::Hour.new(8)
offset + DateTime.new(2012,5,1,4,3)
#=> #<DateTime: 2012-05-01T12:03:00+00:00 ((2456049j,43380s,0n),+0s,2299161j)>

Constant Summary collapse

FREQ =
'H'.freeze

Instance Method Summary collapse

Methods inherited from Tick

#+, #-, #==, #period

Methods inherited from DateOffsetType

#freq_string, #initialize

Methods inherited from DateOffset

#+, #-, #-@, #initialize

Constructor Details

This class inherits a constructor from Daru::Offsets::DateOffsetType

Instance Method Details

#multiplierObject



164
165
166
# File 'lib/daru/date_time/offsets.rb', line 164

def multiplier
  1.to_r / 24
end