struct

Astro::Date::Julian

Inherits Struct < Value < Object

Constants

ASTRO_FIRST = 4716
DAYS_IN_MONTH = 30.6001
DAYS_IN_YEAR = 365.25
FIRST = -4712

Constructors

from_jd(jd : JD) : self

Converting a JD into a Julian date

Source
new(year : Int32, mon : Int32, day, hour = 0, min = 0, sec = 0)
Source

Class methods

date_from_day(year : Int32, day : Int32 | Float32 | Float64)
Source
day_of_week(jd : JD) : DayOfWeek
Source
day_of_year(leap : Bool, mon : Int32, day : Int32 | Float32 | Float64)
Source
day_of_year(year, mon, day)
Source
day_of_year(jd : JD) : Int32
Source
leap?(year)
Source
mjd(jd)

Getting the modified julian day

Source
zero(year)
Source

Instance methods

+(other : JD) : self
Source
-(other : Julian) : JD
Source
day=(day : Int32 | Float32 | Float64)
Source
day_of_year
Source
leap?

Check whether the year is a leap year

Source
mon=(mon : Int32)
Source
to_jd(gregorian : Bool = true) : JD

Converting a Gregorian / Julian date into JD

Source
year
Source
year=(year : Int32)
Source
zero

Getting the Julian Day JD0 (January 0.0) of a Gregorian given year (the same as December 31.0 of the preceding year)

Source

Nested types