hare

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

commit 507cb19ddd2a545180689f78fb2cd781aaba8e65
parent 69d0e225e3e562d43c1c1feba501a757bfba147c
Author: Byron Torres <b@torresjrjr.com>
Date:   Mon, 18 Apr 2022 23:58:05 +0100

datetime, time, time::chrono: correct docs links

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

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

diff --git a/datetime/datetime.ha b/datetime/datetime.ha @@ -67,12 +67,12 @@ fn init() datetime = datetime { // observe Daylight Saving Time. // // If specified (non-void), 'offs' must match one of the timezone's observed -// zoffsets, or will fail. See [[chrono::fixedzone]] for custom timezones. +// zoffsets, or will fail. See [[time::chrono::fixedzone]] for custom timezones. // // You may omit the zoffset. If the givem timezone has a single zone, [[new]] // will use that zone's zoffset. Otherwise [[new]] will try to infer the zoffset // from the multiple zones. This will fail during certain timezone transitions, -// where certain datetimes are [[ambiguous]] or [[nonexistant]]. For example: +// where certain datetimes are ambiguous or nonexistent. For example: // // - In the Europe/Amsterdam timezone, at 1995 March 26th, // the local time 02:30 was never observed, @@ -164,7 +164,7 @@ export fn now() datetime = { return from_moment(m); }; -// Creates a [[datetime]] from a [[chrono::moment]]. +// Creates a [[datetime]] from a [[time::chrono::moment]]. export fn from_moment(m: chrono::moment) datetime = { const dt = init(); dt.date = m.date; @@ -193,7 +193,7 @@ export fn from_str(layout: str, s: str) (datetime | insufficient | invalid) = { return finish(&b)?; }; -// Creates a [[chrono::moment]] from a [[datetime]] +// Creates a [[time::chrono::moment]] from a [[datetime]] export fn to_moment(dt: datetime) chrono::moment = { return chrono::moment { date = dt.date, diff --git a/datetime/timezone.ha b/datetime/timezone.ha @@ -5,7 +5,7 @@ use time; use time::chrono; // Transforms and creates a new [[datetime]] in a different -// [[chrono::locality]]. +// [[time::chrono::locality]]. export fn in(loc: chrono::locality, dt: datetime) datetime = { const old = to_moment(dt); const new = chrono::in(loc, old); diff --git a/time/chrono/timescale.ha b/time/chrono/timescale.ha @@ -8,7 +8,7 @@ export type timescale = struct { from_tai: *ts_converter, }; -// Converts one [[time::instant]] in one [[chrono::timescale]] to another +// Converts one [[time::instant]] from one [[timescale]] to another export type ts_converter = fn(i: time::instant) (time::instant | time::error); // International Atomic Time diff --git a/time/chrono/tzdb.ha b/time/chrono/tzdb.ha @@ -26,10 +26,9 @@ export fn strerror(err: error) const str = { }; }; -// Parses and retrieves a [[chrono::timezone]] from the system zoneinfo -// database, or if applicable, from an internal selection of timezones. -// All tzdb timezones default to the [[chrono::utc]] timescale and -// [[chrono::EARTH_DAY]] daylength. +// Parses and retrieves a [[timezone]] from the system's zoneinfo database, or +// if applicable, from an internal selection of timezones. All timezones +// provided default to the [[utc]] timescale and [[EARTH_DAY]] daylength. export fn tz(name: str) (timezone | fs::error | io::error | invalidtzif) = { // TODO: Move this path to +linux et al const prefix = "/usr/share/zoneinfo/";