hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 9dc6c6a727dc9a8a4cb0c35a71b8ced61f1ba1f9
parent a90156cb47828bd5acf80941a5898140528600b6
Author: Byron Torres <b@torresjrjr.com>
Date:   Thu,  7 Mar 2024 00:14:00 +0000

time::date: rename epochal day constants

Rename [[EPOCHAL_JULIAN]] to [[EPOCHDAY_JULIAN]].
Rename [[EPOCHAL_GREGORIAN]] to [[EPOCHDAY_GREGORIAN]].

Breaking-Change: 0.24.0
Signed-off-by: Byron Torres <b@torresjrjr.com>

Diffstat:
Mtime/date/daydate.ha | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/time/date/daydate.ha b/time/date/daydate.ha @@ -5,11 +5,11 @@ // we provide useful constant for working with the astronomically numbered // proleptic Gregorian calendar, as offsets from the Hare epoch. -// The Hare epoch of the Julian Day Number. -export def EPOCHAL_JULIAN: i64 = -2440588; +// The Hare epochal day of the Julian Day Number. +export def EPOCHDAY_JULIAN: i64 = -2440588; -// The Hare epoch of the Gregorian Common Era. -export def EPOCHAL_GREGORIAN: i64 = -719164; +// The Hare epochal day of the Gregorian Common Era. +export def EPOCHDAY_GREGORIAN: i64 = -719164; // Number of days in the Gregorian 400 year cycle def GREGORIAN_CYCLE_DAYS: i64 = 146097; @@ -85,7 +85,7 @@ fn calc_ymd(e: i64) (int, int, int) = { cycles += 1; }; - const J = E - EPOCHAL_JULIAN; + const J = E - EPOCHDAY_JULIAN; const b = 274277; const c = -38; @@ -228,7 +228,7 @@ fn calc_daydate__ymd(y: int, m: int, d: int) (i64 | invalid) = { - 32075 ); - const e = jdn + EPOCHAL_JULIAN - (GREGORIAN_CYCLE_DAYS * cycles); + const e = jdn + EPOCHDAY_JULIAN - (GREGORIAN_CYCLE_DAYS * cycles); return e; };