///|
/// Milliseconds in a 24-hour day.
pub const MS_PER_DAY : Int64 = 86_400_000L
///|
/// Nanoseconds in a 24-hour day.
pub const NS_PER_DAY : Int64 = 86_400_000_000_000L
///|
/// Nanoseconds in an hour.
const NS_PER_HOUR : Int64 = 3_600_000_000_000L
///|
/// Nanoseconds in a minute.
const NS_PER_MINUTE : Int64 = 60_000_000_000L
///|
/// Nanoseconds in a second.
const NS_PER_SECOND : Int64 = 1_000_000_000L
///|
/// Milliseconds in an hour.
const MS_PER_HOUR : Int64 = 3_600_000L
///|
/// Milliseconds in a minute.
const MS_PER_MINUTE : Int64 = 60_000L
///|
/// The largest epoch-day magnitude a `PlainDate` may reach, corresponding to
/// the ISO year range `-271821-04-19 ..= +275760-09-14`.
const MAX_EPOCH_DAYS : Int64 = 100_000_001L
///|
/// The greatest number of nanoseconds an `Instant` may hold: 10^8 days after
/// the epoch.
pub let ns_max_instant : @int128.Int128 = @int128.of_int64(NS_PER_DAY).mul(
@int128.of_int(100_000_000),
)
///|
/// The least number of nanoseconds an `Instant` may hold: 10^8 days before the
/// epoch.
pub let ns_min_instant : @int128.Int128 = ns_max_instant.neg()
///|
/// `2^53`, the boundary of exactly representable integers in a `Double`.
const TWO_POWER_FIFTY_THREE : Int64 = 9_007_199_254_740_992L
///|
/// The largest magnitude a normalized time duration may take, in nanoseconds:
/// `(2^53 - 1) * 10^9 + (10^9 - 1)`.
pub let max_time_duration : @int128.Int128 = @int128.of_int64(
TWO_POWER_FIFTY_THREE - 1L,
)
.mul(@int128.of_int64(NS_PER_SECOND))
.add(@int128.of_int64(NS_PER_SECOND - 1L))
///|
let i128_ns_per_day : @int128.Int128 = @int128.of_int64(NS_PER_DAY)
///|
let i128_thousand : @int128.Int128 = @int128.of_int(1000)
///|
let i128_million : @int128.Int128 = @int128.of_int(1_000_000)
///|
let i128_billion : @int128.Int128 = @int128.of_int64(NS_PER_SECOND)