hare

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

commit 4cf1a66f739cdaaa68d3825df19c6fabdcc027de
parent ece4f94dc50190d770b31e929e76bfdf59c51d4c
Author: Byron Torres <b@torresjrjr.com>
Date:   Sat, 25 Dec 2021 22:16:36 +0000

remove redundant calc_ymd()

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

Diffstat:
Mdatetime/datetime.ha | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/datetime/datetime.ha b/datetime/datetime.ha @@ -24,7 +24,6 @@ export type datetime = struct { }; - fn init() datetime = datetime { date = 0, time = 0, @@ -92,7 +91,6 @@ export fn now() datetime = { const i = time::now(time::clock::REALTIME); const unix = time::unix(i); const date = (unix / 86400); - const caldate = calc_ymd(date); const dt = datetime { date = date, time = ((i.sec / 86400) * time::NANOSECOND + i.nsec), @@ -104,9 +102,9 @@ export fn now() datetime = { loc = &chrono::local, era = void, - year = caldate.0, - month = caldate.1, - day = caldate.2, + year = void, + month = void, + day = void, isoweekyear = void, isoweek = void, week = void,