hare

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

commit ece4f94dc50190d770b31e929e76bfdf59c51d4c
parent b7d4281445923daef30f4d2002b2e0608251b534
Author: Byron Torres <b@torresjrjr.com>
Date:   Mon, 20 Dec 2021 03:15:07 +0000

use EPOCH_COMMONERA for epochal()

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

Diffstat:
Mdatetime/calendar.ha | 12+-----------
1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/datetime/calendar.ha b/datetime/calendar.ha @@ -20,17 +20,7 @@ export def EPOCH_COMMONERA: i64 = -719164; // Evaluates a [[datetime]]'s number of days since the calendar epoch 0000-01-01 export fn epochal(dt: *datetime) chrono::epochal = { - return dt.date; - -// match (dt.date) { -// case void => -// // How to resolve? -// // Use calc_epochal_from_*? How to avoid recursion? -// // When to rely on input validation? -// abort("TODO"); -// case let e: chrono::epochal => -// return e; -// }; + return dt.date - EPOCH_COMMONERA; }; // Evaluates a [[datetime]]'s era