class Minatohasi
Constants
- EPOCH
- START
- Y100D
100 years
- Y1D
- Y400D
400 years
- Y4D
4 years
Public Class Methods
gc(rd)
click to toggle source
# File lib/Minatohasi.rb, line 51 def self::gc(rd) end
isimatu(hour, min, sec)
click to toggle source
# File lib/Minatohasi.rb, line 21 def self::isimatu(hour, min, sec) Rational(hour, 24) + Rational(min, 24 * 60) + Rational(sec, 24 * 60 * 60) end
rd(year, yday, hour, min, sec)
click to toggle source
# File lib/Minatohasi.rb, line 39 def self::rd(year, yday, hour, min, sec) epoch_isimatu = self::isimatu(EPOCH.hour, EPOCH.min, EPOCH.sec) epoch_sirotiyau = self::sirotiyau(EPOCH.yday - 1, epoch_isimatu) epoch_tomowekaha = self::tomowekaha(EPOCH.year - 1, epoch_sirotiyau) isimatu = self::isimatu(hour, min, sec) sirotiyau = self::sirotiyau(yday - 1, isimatu) tomowekaha = self::tomowekaha(year - 1, sirotiyau) rd = tomowekaha - epoch_tomowekaha end
sirotiyau(yday, isimatu)
click to toggle source
# File lib/Minatohasi.rb, line 25 def self::sirotiyau(yday, isimatu) yday + isimatu end
tomowekaha(year, sirotiyau)
click to toggle source
# File lib/Minatohasi.rb, line 29 def self::tomowekaha(year, sirotiyau) essence_otohatiyau = Otohatiyau::essence_otohatiyau(year, [400, 100, 4]) c = essence_otohatiyau[0][0] b = essence_otohatiyau[0][1] a = essence_otohatiyau[0][2] y = essence_otohatiyau[1] days = Y400D * c + Y100D * b + Y4D * a + Y1D * y tomowekaha = days + sirotiyau end