hare

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

commit f9ed6c1d1531667dca8bbdaf4d213e32ff0ad84e
parent c48e37d6872b8bb06bd7bf2b75e4ef95da341b54
Author: Drew DeVault <sir@cmpwn.com>
Date:   Wed, 13 Apr 2022 15:05:07 +0200

datetime: fix up docs

Also patches up an error with gen-stdlib on FreeBSD

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

Diffstat:
Mdatetime/README | 12++++++------
Mscripts/gen-stdlib | 1+
Mstdlib.mk | 2++
3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/datetime/README b/datetime/README @@ -1,8 +1,8 @@ The datetime module implements the common international "Gregorian" chronology, based on the astronomically numbered proleptic Gregorian calendar, as per ISO 8601, and the common 24 hour clock. It provides [[datetime]], a representation -of civil date/time and an extension of the [[chrono::moment]] type, optimized -for dealing with the Gregorian chronology. +of civil date/time and an extension of the [[time::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 [[builder]] to construct a datetime @@ -19,10 +19,10 @@ functions ([[year]], [[month]], [[day]], etc). Accessing or modifying a [[datetime]]'s fields directly is discouraged. To mutate a datetime in code, the use of the [[builder]] interface is recommended. -[[datetime]]s may be localized to different [[chrono::timezone]]s via the [[in]] -function. The "field" functions will evaluate the correct values accordingly. -You'll find a standard selection of world timezones in the [[time::tzdb]] -module. +[[datetime]]s may be localized to different [[time::chrono::timezone]]s via the +[[in]] function. The "field" functions will evaluate the correct values +accordingly. You'll find a standard selection of world timezones in the +[[time::tzdb]] module. To convert datetimes to and from strings, use [[parse]] and [[format]]. diff --git a/scripts/gen-stdlib b/scripts/gen-stdlib @@ -1172,6 +1172,7 @@ time() { gen_srcs -pfreebsd time \ +freebsd/functions.ha \ arithm.ha \ + conv.ha \ types.ha gen_ssa -pfreebsd time } diff --git a/stdlib.mk b/stdlib.mk @@ -1787,6 +1787,7 @@ $(HARECACHE)/time/time-linux.ssa: $(stdlib_time_linux_srcs) $(stdlib_rt) $(stdli stdlib_time_freebsd_srcs= \ $(STDLIB)/time/+freebsd/functions.ha \ $(STDLIB)/time/arithm.ha \ + $(STDLIB)/time/conv.ha \ $(STDLIB)/time/types.ha $(HARECACHE)/time/time-freebsd.ssa: $(stdlib_time_freebsd_srcs) $(stdlib_rt) @@ -3797,6 +3798,7 @@ $(TESTCACHE)/time/time-linux.ssa: $(testlib_time_linux_srcs) $(testlib_rt) $(tes testlib_time_freebsd_srcs= \ $(STDLIB)/time/+freebsd/functions.ha \ $(STDLIB)/time/arithm.ha \ + $(STDLIB)/time/conv.ha \ $(STDLIB)/time/types.ha $(TESTCACHE)/time/time-freebsd.ssa: $(testlib_time_freebsd_srcs) $(testlib_rt)