hare

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

commit 6569a9970de4b4dbbc8eaaa6e6de00699eb8c90b
parent 1035f3c642a7a913875f553da01587fb3b09a888
Author: Byron Torres <b@torresjrjr.com>
Date:   Thu, 11 Nov 2021 19:32:21 +0000

index eras BCE=0, CE=1

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

Diffstat:
Mdatetime/calendar.ha | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/datetime/calendar.ha b/datetime/calendar.ha @@ -43,10 +43,10 @@ export fn epocal(m: chrono::moment) int = { // Calculates a moment's era export fn era(m: chrono::moment) int = { - if (m.date > EPOCH_COMMONERA) { - return 0; // CE, Common Era + if (m.date >= EPOCH_COMMONERA) { + return 1; // CE, Common Era } else { - return -1; // BCE, Before Common Era + return 0; // BCE, Before Common Era }; };