JulianDate

JulianDate :: # (opaque)

Proleptic Julian day, with astronomical years (0 means 1 BCE). Valid years are -2147483648 through 2147483647, inclusive. No timezone or resolved timeline is implied by a date.

from_fields : Fields -> Try(JulianDate, [OutOfRange, InvalidMonth, InvalidDay, ..])

Validate a proleptic Julian date with astronomical year numbering. Return OutOfRange outside the supported year range, InvalidMonth outside 1..12, or InvalidDay for a nonexistent day. No clamping is performed.

days_in_month : I64, U8 -> Try(U8, [OutOfRange, InvalidMonth, ..])

Return the number of days in a Julian month, including its leap-year rule. Reject unsupported years with OutOfRange and months outside 1..12 with InvalidMonth.

to_fields : JulianDate -> Fields

Read the validated astronomical year and one-based month/day in the Julian calendar.

to_civil_day : JulianDate -> CivilDay

Convert this date to the shared civil-day coordinate. Equal dates across calendars have equal coordinates; no timezone is chosen.

from_civil_day : CivilDay -> Try(JulianDate, [OutOfRange, ..])

Describe a shared civil-day coordinate in the Julian calendar. Return OutOfRange if that day lies outside the supported year range.

to_hash : JulianDate, Hasher -> Hasher

Hash Julian dates consistently with equality for dictionary and set keys. Hash values are not a stable serialization format.

to_inspect : JulianDate -> Str

Return a concise diagnostic description of these Julian dates. Use explicit conversions or text serialization when storing or exchanging data.

is_lt : JulianDate, JulianDate -> Bool

Whether the first of two Julian dates precedes the second in their numeric order.

is_lte : JulianDate, JulianDate -> Bool

Whether the first of two Julian dates precedes or equals the second.

is_gt : JulianDate, JulianDate -> Bool

Whether the first of two Julian dates follows the second in their numeric order.

is_gte : JulianDate, JulianDate -> Bool

Whether the first of two Julian dates follows or equals the second.

is_eq : JulianDate, JulianDate -> Bool

Equality of Julian dates; values of other temporal domains must be converted explicitly.

Fields : { year : I64, month : U8, day : U8 }

Astronomical year and one-based month/day fields for a Julian date. Year zero means 1 BCE; from_fields validates combinations and provider range.