Method: When::TimeStandard::TimeBasis#_normalize_time_basis
- Defined in:
- lib/when_exe/timestandard.rb
#_normalize_time_basis ⇒ Object
When::TM::Calendar のための TimeBasis の初期化
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
# File 'lib/when_exe/timestandard.rb', line 380 def _normalize_time_basis @_time_basis ||= @time_basis || (@location ? @location.long / @location.degree * 240 : When::UTC) @_time_basis = When::Locale._split(@_time_basis) if @_time_basis.kind_of?(String) @_time_basis = [@_time_basis] unless @_time_basis.kind_of?(Array) @_time_basis = @_time_basis.map {|clock| When.Clock(clock)} @_time_basis_offset = @_time_basis.map {|clock| -clock.universal_time / When::TM::Duration::DAY} @time_basis = @_time_basis[0] if @time_basis if @_time_basis[0].time_standard.kind_of?(LocalApparentTime) extend ApparentTimeBasis else extend FixedTimeBasis end end |