Increase DateTicks to 64 bits, fix overflow after year 79455

This commit is contained in:
Jonathan G Rennison
2024-01-08 23:16:54 +00:00
parent bd35b0c47c
commit 16b840d86e
7 changed files with 12 additions and 10 deletions

View File

@@ -87,12 +87,12 @@ inline constexpr Year DateDeltaToYears(DateDelta date)
inline constexpr DateTicks DateToDateTicks(Date date, DateFract fract = 0)
{
return (date.base() * DAY_TICKS) + fract;
return ((int64_t)date.base() * DAY_TICKS) + fract;
}
inline constexpr DateTicksDelta DateDeltaToDateTicksDelta(DateDelta date, DateFract fract = 0)
{
return (date.base() * DAY_TICKS) + fract;
return ((int64_t)date.base() * DAY_TICKS) + fract;
}
inline DateTicks NowDateTicks()