hare

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

commit ab6f3e780b1b7e3bb89d45d4984c1304e2011b2e
parent 83cd32a61297c6f650a5be3c6edb54757e7a22cd
Author: Byron Torres <b@torresjrjr.com>
Date:   Mon, 31 Jan 2022 23:55:07 +0000

rm {chrono,datetime}::tranform() docstrings

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

Diffstat:
Mdatetime/timezone.ha | 10++++------
Mtime/chrono/timezone.ha | 2--
2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/datetime/timezone.ha b/datetime/timezone.ha @@ -9,12 +9,6 @@ export fn in(loc: chrono::locality, dt: datetime) datetime = { return new_dt; }; -// Returns a fictitious [[datetime]] which is shifted in time by a zone offset. -// This is a utility function. Use with caution. -export fn transform(dt: datetime, zo: time::duration) datetime = { - return from_moment(chrono::transform(to_moment(dt), zo)); -}; - // Finds and returns a [[datetime]]'s currently observed zone export fn lookupzone(dt: *datetime) chrono::zone = { const m = to_moment(*dt); @@ -22,3 +16,7 @@ export fn lookupzone(dt: *datetime) chrono::zone = { dt.zone = z; return z; }; + +export fn transform(dt: datetime, zo: time::duration) datetime = { + return from_moment(chrono::transform(to_moment(dt), zo)); +}; diff --git a/time/chrono/timezone.ha b/time/chrono/timezone.ha @@ -67,8 +67,6 @@ export fn in(loc: locality, m: moment) moment = { return new(m.date, m.time, loc); // resets .zone }; -// Returns a fictitious [[moment]] which is shifted in time by a zone offset. -// This is a utility function for external modules. Use with caution. export fn transform(m: moment, zo: time::duration) moment = { const daylen = m.loc.daylength;