hare

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

commit f4040e236b7e58b3a623d7fb644f9b1db5e76b87
parent 2c032c500fba3061b322e2bfe17530ca55b9f826
Author: Drew DeVault <sir@cmpwn.com>
Date:   Wed, 13 Apr 2022 14:55:03 +0200

datetime: docs improvements

Signed-off-by: Drew DeVault <sir@cmpwn.com>

Diffstat:
Mdatetime/README | 4++--
Mdatetime/timezone.ha | 5+++--
2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/datetime/README b/datetime/README @@ -5,8 +5,8 @@ of civil date/time and an extension of the [[chrono::moment]] type, optimized for dealing with the Gregorian chronology. Datetimes are created with [[new]], [[now]], or with one of the various "from_" -functions. Alternatively, use a [[mock]] to construct a datetime piece-by-piece, -by field assignements or by parsing strings with [[parse]]. +functions. Alternatively, use a [[builder]] to construct a datetime +piece-by-piece, by field assignements or by parsing strings with [[parse]]. [[datetime]] instances are designed to be always valid and internally consistent. They should be treated as immutable, and their fields as private. diff --git a/datetime/timezone.ha b/datetime/timezone.ha @@ -1,7 +1,8 @@ use time; use time::chrono; -// Transforms and creates a new [[datetime]] in a different [[chrono::locality]] +// Transforms and creates a new [[datetime]] in a different +// [[chrono::locality]]. export fn in(loc: chrono::locality, dt: datetime) datetime = { const old = to_moment(dt); const new = chrono::in(loc, old); @@ -9,7 +10,7 @@ export fn in(loc: chrono::locality, dt: datetime) datetime = { return new_dt; }; -// Finds and returns a [[datetime]]'s currently observed zone +// Finds and returns a [[datetime]]'s currently observed zone. export fn lookupzone(dt: *datetime) chrono::zone = { const m = to_moment(*dt); const z = chrono::lookupzone(&m);