ユリウス日
see gml schema
Julian Day Number
19700101T120000Z
オブジェクトの生成
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
ユリウス日の剰余
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 : 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 : 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.
Generated with the Darkfish Rdoc Generator 1.1.6.