CivilDay

CivilDay :: # (opaque)

A civil-day coordinate: zero labels Gregorian 1970-01-01. This is not a timestamp, a UTC midnight, or an elapsed quantity.

from_day_number : I64 -> CivilDay

Construct a civil-day coordinate from any signed I64 day number. Zero is Gregorian 1970-01-01; negative numbers denote preceding days. Converting to a calendar date can fail outside that calendar's range.

to_day_number : CivilDay -> I64

Read the signed count of civil days relative to Gregorian 1970-01-01. It does not measure elapsed days on a resolved timeline.

is_lt : CivilDay, CivilDay -> Bool

Whether the first of two civil-day coordinates precedes the second in their numeric order.

is_lte : CivilDay, CivilDay -> Bool

Whether the first of two civil-day coordinates precedes or equals the second.

is_gt : CivilDay, CivilDay -> Bool

Whether the first of two civil-day coordinates follows the second in their numeric order.

is_gte : CivilDay, CivilDay -> Bool

Whether the first of two civil-day coordinates follows or equals the second.

to_hash : CivilDay, Hasher -> Hasher

Hash civil-day coordinates consistently with equality for dictionary and set keys. Hash values are not a stable serialization format.

to_inspect : CivilDay -> Str

Return a concise diagnostic description of these civil-day coordinates. Use explicit conversions or text serialization when storing or exchanging data.

is_eq : CivilDay, CivilDay -> Bool

Equality of civil-day coordinates; values of other temporal domains must be converted explicitly.

compare : CivilDay, CivilDay -> [LT, EQ, GT]

Compare two civil-day coordinates, returning LT, EQ or GT. Calendar descriptions of the same civil day compare equal after conversion.