Methods

Class Index [+]

Quicksearch

When::TM::JulianDate

ユリウス日

see gml schema

Constants

JD19700101

Julian Day Number

  19700101T120000Z

Public Class Methods

new(universal_time, options={}) click to toggle source

オブジェクトの生成

  universal_time : Numeric
    内部時間による時間座標値

  options        : Hash
    :frame     => When::TM::Clock
    :precision => Integer (Enumerated in the When::Coordinates Module)
     # File when/tmposition.rb, line 897
897:     def initialize(universal_time, options={})
898:       @frame = options.delete(:frame)
899:       @frame = When.Clock(@frame) if (@frame.kind_of?(String))
900:       @frame = @frame._daylight(self.class.new(universal_time, {:frame=>When.utc})) if @frame && @frame._need_validate
901:       precision    = options.delete(:precision)
902:       precision  ||= DAY unless @frame.kind_of?(Clock)
903:       @precision   = Index.precision(precision)
904:       super
905:     end

Public Instance Methods

%(other) click to toggle source

ユリウス日の剰余

  other   : When::Coordinates::Residue

  returns : Numeric
     # File when/tmposition.rb, line 880
880:     def %(other)
881:       raise TypeError,"The right operand should be When::Coordinates::Residue" unless Residue === other
882:       raise ArgumentError,"The right operand should have a unit 'D'" unless other.unit == 'DAY'
883:       other % to_i
884:     end
&(other) click to toggle source

ユリウス日が指定の剰余となる日

  other   : When::Coordinates::Residue

  returns : When::TM::TemporalPosition
     # File when/tmposition.rb, line 865
865:     def &(other)
866:       raise TypeError,"The right operand should be When::Coordinates::Residue" unless Residue === other
867:       raise ArgumentError,"The right operand should have a unit 'D'" unless other.unit == 'DAY'
868:       jdn      = to_i
869:       new_date = self.dup
870:       new_date.universal_time += ((other & jdn) - jdn) * IntervalLength::DAY
871:       return new_date
872:     end
+(other) click to toggle source

加算

  other   : Numeric or When::TM::IntervalLength

  returns : When::TM::TemporalPosition
     # File when/tmposition.rb, line 851
851:     def +(other)
852:       new_date = super
853:       if new_date.frame && new_date.frame._need_validate
854:         new_date.frame = new_date.frame._daylight(self.class.dynamical_time(new_date.dynamical_time, {:frame=>When.utc}))
855:       end
856:       return new_date
857:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.