# new JulianDay(num)
Parameters:
Name | Type | Description |
---|---|---|
num |
number
|
the Julian Day expressed as a floating point number |
Methods
# addDate(offset)
Add an offset to the current date instance. The offset should be expressed in terms of Julian days. That is, each integral unit represents one day of time, and fractional part represents a fraction of a regular 24-hour day.
Parameters:
Name | Type | Description |
---|---|---|
offset |
number
|
an amount to add (or subtract) to the current result instance. |
# getDate() → {number}
Return the Julian Day expressed as a floating point number.
the Julian Day as a number
number
# getDayFraction()
Return the fractional portion of this Julian Day instance. This portion corresponds to the time of day for the instance.
# getDays() → {number}
Return the integral portion of this Julian Day instance. This corresponds to the number of days since the beginning of the epoch.
the integral portion of this Julian Day
number
# setDate(num)
Set the date of this Julian Day instance.
Parameters:
Name | Type | Description |
---|---|---|
num |
number
|
the numeric Julian Day to set into this instance |
# setDayFraction(fraction)
Set the fractional part of the Julian Day. The fractional part represents the portion of a fully day. Julian dates start at noon, and proceed until noon of the next day. That would mean midnight is represented as a fractional part of 0.5.
Parameters:
Name | Type | Description |
---|---|---|
fraction |
number
|
The fractional part of the Julian date |
# setDays(days)
Set the date of this Julian Day instance.
Parameters:
Name | Type | Description |
---|---|---|
days |
number
|
the julian date expressed as a floating point number |