hare

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

commit e624ff3b59a9781ce1053e481c36d0ff1d2e6be8
parent ae416fc9bbf6805b4554eff3bec2ae54ac6555c9
Author: Byron Torres <b@torresjrjr.com>
Date:   Sat, 13 May 2023 01:28:18 +0100

move datetime -> time::date

Hare code shall now use the shorter `date::` instead of `datetime::`.

Diffstat:
Mlog/logger.ha | 10+++++-----
Mscripts/gen-stdlib | 76++++++++++++++++++++++++++++++++++++++--------------------------------------
Mscripts/install-mods | 1-
Mstdlib.mk | 224++++++++++++++++++++++++++++++++++++++++----------------------------------------
Rdatetime/README -> time/date/README | 0
Rdatetime/arithmetic.ha -> time/date/arithmetic.ha | 0
Rdatetime/chronology.ha -> time/date/chronology.ha | 0
Rdatetime/date.ha -> time/date/date.ha | 0
Rdatetime/datetime.ha -> time/date/datetime.ha | 0
Rdatetime/duration.ha -> time/date/duration.ha | 0
Rdatetime/errors.ha -> time/date/errors.ha | 0
Rdatetime/format.ha -> time/date/format.ha | 0
Rdatetime/parse.ha -> time/date/parse.ha | 0
Rdatetime/period.ha -> time/date/period.ha | 0
Rdatetime/reckon.ha -> time/date/reckon.ha | 0
Rdatetime/time.ha -> time/date/time.ha | 0
Rdatetime/timezone.ha -> time/date/timezone.ha | 0
Rdatetime/virtual.ha -> time/date/virtual.ha | 0
18 files changed, 155 insertions(+), 156 deletions(-)

diff --git a/log/logger.ha b/log/logger.ha @@ -1,7 +1,7 @@ -use datetime; use fmt; use io; use os; +use time::date; // Interface for implementing a logger. export type logger = struct { @@ -26,9 +26,9 @@ export fn new(sink: io::handle) stdlogger = { fn log_println(sink: *logger, fields: fmt::formattable...) void = { const sink = sink: *stdlogger; assert(sink.println == &log_println); - const now = datetime::now(); + const now = date::now(); fmt::fprint(sink.sink, "["): void; - datetime::format(sink.sink, datetime::STAMP, &now): void; + date::format(sink.sink, date::STAMP, &now): void; fmt::fprint(sink.sink, "] "): void; fmt::fprintln(sink.sink, fields...): void; }; @@ -36,9 +36,9 @@ fn log_println(sink: *logger, fields: fmt::formattable...) void = { fn log_printfln(sink: *logger, fmt: str, fields: fmt::field...) void = { const sink = sink: *stdlogger; assert(sink.printfln == &log_printfln); - const now = datetime::now(); + const now = date::now(); fmt::fprint(sink.sink, "["): void; - datetime::format(sink.sink, datetime::STAMP, &now): void; + date::format(sink.sink, date::STAMP, &now): void; fmt::fprint(sink.sink, "] "): void; fmt::fprintfln(sink.sink, fmt, fields...): void; }; diff --git a/scripts/gen-stdlib b/scripts/gen-stdlib @@ -195,41 +195,6 @@ bytes() { gen_ssa bytes types } -datetime() { - gen_srcs -plinux datetime \ - arithmetic.ha \ - chronology.ha \ - errors.ha \ - date.ha \ - datetime.ha \ - duration.ha \ - format.ha \ - parse.ha \ - period.ha \ - reckon.ha \ - time.ha \ - timezone.ha \ - virtual.ha - gen_ssa -plinux datetime ascii errors fmt io strconv strings strio \ - time time::chrono - gen_srcs -pfreebsd datetime \ - arithmetic.ha \ - chronology.ha \ - errors.ha \ - date.ha \ - datetime.ha \ - duration.ha \ - format.ha \ - parse.ha \ - period.ha \ - reckon.ha \ - time.ha \ - timezone.ha \ - virtual.ha - gen_ssa -pfreebsd datetime ascii errors fmt io strconv strings strio \ - time time::chrono -} - crypto() { if [ $testing -eq 0 ] then @@ -984,9 +949,9 @@ linux_vdso() { log() { gen_srcs -plinux log logger.ha global.ha funcs.ha silent.ha - gen_ssa -plinux log datetime fmt io os + gen_ssa -plinux log fmt io os time::date gen_srcs -pfreebsd log logger.ha global.ha funcs.ha silent.ha - gen_ssa -pfreebsd log datetime fmt io os + gen_ssa -pfreebsd log fmt io os time::date } gensrcs_math() { @@ -1410,6 +1375,41 @@ time_chrono() { bufio bytes encoding::utf8 endian errors fmt fs io os strconv strings time path } +time_date() { + gen_srcs -plinux time::date \ + arithmetic.ha \ + chronology.ha \ + errors.ha \ + date.ha \ + datetime.ha \ + duration.ha \ + format.ha \ + parse.ha \ + period.ha \ + reckon.ha \ + time.ha \ + timezone.ha \ + virtual.ha + gen_ssa -plinux time::date \ + ascii errors fmt io strconv strings strio time time::chrono + gen_srcs -pfreebsd time::date \ + arithmetic.ha \ + chronology.ha \ + errors.ha \ + date.ha \ + datetime.ha \ + duration.ha \ + format.ha \ + parse.ha \ + period.ha \ + reckon.ha \ + time.ha \ + timezone.ha \ + virtual.ha + gen_ssa -pfreebsd time::date \ + ascii errors fmt io strconv strings strio time time::chrono +} + types() { gen_srcs types \ limits.ha \ @@ -1558,7 +1558,6 @@ crypto::sha512 crypto::curve25519 crypto::ed25519 crypto::x25519 -datetime linux freebsd dirs encoding::base64 encoding::base32 @@ -1621,6 +1620,7 @@ temp linux freebsd test time linux freebsd time::chrono linux freebsd +time::date linux freebsd types types::c unix linux freebsd diff --git a/scripts/install-mods b/scripts/install-mods @@ -3,7 +3,6 @@ modules="ascii bufio bytes crypto -datetime dirs encoding endian diff --git a/stdlib.mk b/stdlib.mk @@ -325,16 +325,6 @@ stdlib_deps_any += $(stdlib_crypto_x25519_any) stdlib_crypto_x25519_linux = $(stdlib_crypto_x25519_any) stdlib_crypto_x25519_freebsd = $(stdlib_crypto_x25519_any) -# gen_lib datetime (linux) -stdlib_datetime_linux = $(HARECACHE)/datetime/datetime-linux.o -stdlib_env += HARE_TD_datetime=$(HARECACHE)/datetime/datetime.td -stdlib_deps_linux += $(stdlib_datetime_linux) - -# gen_lib datetime (freebsd) -stdlib_datetime_freebsd = $(HARECACHE)/datetime/datetime-freebsd.o -stdlib_env += HARE_TD_datetime=$(HARECACHE)/datetime/datetime.td -stdlib_deps_freebsd += $(stdlib_datetime_freebsd) - # gen_lib dirs (any) stdlib_dirs_any = $(HARECACHE)/dirs/dirs-any.o stdlib_env += HARE_TD_dirs=$(HARECACHE)/dirs/dirs.td @@ -797,6 +787,16 @@ stdlib_time_chrono_freebsd = $(HARECACHE)/time/chrono/time_chrono-freebsd.o stdlib_env += HARE_TD_time::chrono=$(HARECACHE)/time/chrono/time_chrono.td stdlib_deps_freebsd += $(stdlib_time_chrono_freebsd) +# gen_lib time::date (linux) +stdlib_time_date_linux = $(HARECACHE)/time/date/time_date-linux.o +stdlib_env += HARE_TD_time::date=$(HARECACHE)/time/date/time_date.td +stdlib_deps_linux += $(stdlib_time_date_linux) + +# gen_lib time::date (freebsd) +stdlib_time_date_freebsd = $(HARECACHE)/time/date/time_date-freebsd.o +stdlib_env += HARE_TD_time::date=$(HARECACHE)/time/date/time_date.td +stdlib_deps_freebsd += $(stdlib_time_date_freebsd) + # gen_lib types (any) stdlib_types_any = $(HARECACHE)/types/types-any.o stdlib_env += HARE_TD_types=$(HARECACHE)/types/types.td @@ -1200,50 +1200,6 @@ $(HARECACHE)/crypto/x25519/crypto_x25519-any.ssa: $(stdlib_crypto_x25519_any_src @$(stdlib_env) $(HAREC) $(HAREFLAGS) -o $@ -Ncrypto::x25519 \ -t$(HARECACHE)/crypto/x25519/crypto_x25519.td $(stdlib_crypto_x25519_any_srcs) -# datetime (+linux) -stdlib_datetime_linux_srcs = \ - $(STDLIB)/datetime/arithmetic.ha \ - $(STDLIB)/datetime/chronology.ha \ - $(STDLIB)/datetime/errors.ha \ - $(STDLIB)/datetime/date.ha \ - $(STDLIB)/datetime/datetime.ha \ - $(STDLIB)/datetime/duration.ha \ - $(STDLIB)/datetime/format.ha \ - $(STDLIB)/datetime/parse.ha \ - $(STDLIB)/datetime/period.ha \ - $(STDLIB)/datetime/reckon.ha \ - $(STDLIB)/datetime/time.ha \ - $(STDLIB)/datetime/timezone.ha \ - $(STDLIB)/datetime/virtual.ha - -$(HARECACHE)/datetime/datetime-linux.ssa: $(stdlib_datetime_linux_srcs) $(stdlib_rt) $(stdlib_ascii_$(PLATFORM)) $(stdlib_errors_$(PLATFORM)) $(stdlib_fmt_$(PLATFORM)) $(stdlib_io_$(PLATFORM)) $(stdlib_strconv_$(PLATFORM)) $(stdlib_strings_$(PLATFORM)) $(stdlib_strio_$(PLATFORM)) $(stdlib_time_$(PLATFORM)) $(stdlib_time_chrono_$(PLATFORM)) - @printf 'HAREC \t$@\n' - @mkdir -p $(HARECACHE)/datetime - @$(stdlib_env) $(HAREC) $(HAREFLAGS) -o $@ -Ndatetime \ - -t$(HARECACHE)/datetime/datetime.td $(stdlib_datetime_linux_srcs) - -# datetime (+freebsd) -stdlib_datetime_freebsd_srcs = \ - $(STDLIB)/datetime/arithmetic.ha \ - $(STDLIB)/datetime/chronology.ha \ - $(STDLIB)/datetime/errors.ha \ - $(STDLIB)/datetime/date.ha \ - $(STDLIB)/datetime/datetime.ha \ - $(STDLIB)/datetime/duration.ha \ - $(STDLIB)/datetime/format.ha \ - $(STDLIB)/datetime/parse.ha \ - $(STDLIB)/datetime/period.ha \ - $(STDLIB)/datetime/reckon.ha \ - $(STDLIB)/datetime/time.ha \ - $(STDLIB)/datetime/timezone.ha \ - $(STDLIB)/datetime/virtual.ha - -$(HARECACHE)/datetime/datetime-freebsd.ssa: $(stdlib_datetime_freebsd_srcs) $(stdlib_rt) $(stdlib_ascii_$(PLATFORM)) $(stdlib_errors_$(PLATFORM)) $(stdlib_fmt_$(PLATFORM)) $(stdlib_io_$(PLATFORM)) $(stdlib_strconv_$(PLATFORM)) $(stdlib_strings_$(PLATFORM)) $(stdlib_strio_$(PLATFORM)) $(stdlib_time_$(PLATFORM)) $(stdlib_time_chrono_$(PLATFORM)) - @printf 'HAREC \t$@\n' - @mkdir -p $(HARECACHE)/datetime - @$(stdlib_env) $(HAREC) $(HAREFLAGS) -o $@ -Ndatetime \ - -t$(HARECACHE)/datetime/datetime.td $(stdlib_datetime_freebsd_srcs) - # dirs (+any) stdlib_dirs_any_srcs = \ $(STDLIB)/dirs/xdg.ha @@ -1700,7 +1656,7 @@ stdlib_log_linux_srcs = \ $(STDLIB)/log/funcs.ha \ $(STDLIB)/log/silent.ha -$(HARECACHE)/log/log-linux.ssa: $(stdlib_log_linux_srcs) $(stdlib_rt) $(stdlib_datetime_$(PLATFORM)) $(stdlib_fmt_$(PLATFORM)) $(stdlib_io_$(PLATFORM)) $(stdlib_os_$(PLATFORM)) +$(HARECACHE)/log/log-linux.ssa: $(stdlib_log_linux_srcs) $(stdlib_rt) $(stdlib_fmt_$(PLATFORM)) $(stdlib_io_$(PLATFORM)) $(stdlib_os_$(PLATFORM)) $(stdlib_time_date_$(PLATFORM)) @printf 'HAREC \t$@\n' @mkdir -p $(HARECACHE)/log @$(stdlib_env) $(HAREC) $(HAREFLAGS) -o $@ -Nlog \ @@ -1713,7 +1669,7 @@ stdlib_log_freebsd_srcs = \ $(STDLIB)/log/funcs.ha \ $(STDLIB)/log/silent.ha -$(HARECACHE)/log/log-freebsd.ssa: $(stdlib_log_freebsd_srcs) $(stdlib_rt) $(stdlib_datetime_$(PLATFORM)) $(stdlib_fmt_$(PLATFORM)) $(stdlib_io_$(PLATFORM)) $(stdlib_os_$(PLATFORM)) +$(HARECACHE)/log/log-freebsd.ssa: $(stdlib_log_freebsd_srcs) $(stdlib_rt) $(stdlib_fmt_$(PLATFORM)) $(stdlib_io_$(PLATFORM)) $(stdlib_os_$(PLATFORM)) $(stdlib_time_date_$(PLATFORM)) @printf 'HAREC \t$@\n' @mkdir -p $(HARECACHE)/log @$(stdlib_env) $(HAREC) $(HAREFLAGS) -o $@ -Nlog \ @@ -2195,6 +2151,50 @@ $(HARECACHE)/time/chrono/time_chrono-freebsd.ssa: $(stdlib_time_chrono_freebsd_s @$(stdlib_env) $(HAREC) $(HAREFLAGS) -o $@ -Ntime::chrono \ -t$(HARECACHE)/time/chrono/time_chrono.td $(stdlib_time_chrono_freebsd_srcs) +# time::date (+linux) +stdlib_time_date_linux_srcs = \ + $(STDLIB)/time/date/arithmetic.ha \ + $(STDLIB)/time/date/chronology.ha \ + $(STDLIB)/time/date/errors.ha \ + $(STDLIB)/time/date/date.ha \ + $(STDLIB)/time/date/datetime.ha \ + $(STDLIB)/time/date/duration.ha \ + $(STDLIB)/time/date/format.ha \ + $(STDLIB)/time/date/parse.ha \ + $(STDLIB)/time/date/period.ha \ + $(STDLIB)/time/date/reckon.ha \ + $(STDLIB)/time/date/time.ha \ + $(STDLIB)/time/date/timezone.ha \ + $(STDLIB)/time/date/virtual.ha + +$(HARECACHE)/time/date/time_date-linux.ssa: $(stdlib_time_date_linux_srcs) $(stdlib_rt) $(stdlib_ascii_$(PLATFORM)) $(stdlib_errors_$(PLATFORM)) $(stdlib_fmt_$(PLATFORM)) $(stdlib_io_$(PLATFORM)) $(stdlib_strconv_$(PLATFORM)) $(stdlib_strings_$(PLATFORM)) $(stdlib_strio_$(PLATFORM)) $(stdlib_time_$(PLATFORM)) $(stdlib_time_chrono_$(PLATFORM)) + @printf 'HAREC \t$@\n' + @mkdir -p $(HARECACHE)/time/date + @$(stdlib_env) $(HAREC) $(HAREFLAGS) -o $@ -Ntime::date \ + -t$(HARECACHE)/time/date/time_date.td $(stdlib_time_date_linux_srcs) + +# time::date (+freebsd) +stdlib_time_date_freebsd_srcs = \ + $(STDLIB)/time/date/arithmetic.ha \ + $(STDLIB)/time/date/chronology.ha \ + $(STDLIB)/time/date/errors.ha \ + $(STDLIB)/time/date/date.ha \ + $(STDLIB)/time/date/datetime.ha \ + $(STDLIB)/time/date/duration.ha \ + $(STDLIB)/time/date/format.ha \ + $(STDLIB)/time/date/parse.ha \ + $(STDLIB)/time/date/period.ha \ + $(STDLIB)/time/date/reckon.ha \ + $(STDLIB)/time/date/time.ha \ + $(STDLIB)/time/date/timezone.ha \ + $(STDLIB)/time/date/virtual.ha + +$(HARECACHE)/time/date/time_date-freebsd.ssa: $(stdlib_time_date_freebsd_srcs) $(stdlib_rt) $(stdlib_ascii_$(PLATFORM)) $(stdlib_errors_$(PLATFORM)) $(stdlib_fmt_$(PLATFORM)) $(stdlib_io_$(PLATFORM)) $(stdlib_strconv_$(PLATFORM)) $(stdlib_strings_$(PLATFORM)) $(stdlib_strio_$(PLATFORM)) $(stdlib_time_$(PLATFORM)) $(stdlib_time_chrono_$(PLATFORM)) + @printf 'HAREC \t$@\n' + @mkdir -p $(HARECACHE)/time/date + @$(stdlib_env) $(HAREC) $(HAREFLAGS) -o $@ -Ntime::date \ + -t$(HARECACHE)/time/date/time_date.td $(stdlib_time_date_freebsd_srcs) + # types (+any) stdlib_types_any_srcs = \ $(STDLIB)/types/limits.ha \ @@ -2718,16 +2718,6 @@ testlib_deps_any += $(testlib_crypto_x25519_any) testlib_crypto_x25519_linux = $(testlib_crypto_x25519_any) testlib_crypto_x25519_freebsd = $(testlib_crypto_x25519_any) -# gen_lib datetime (linux) -testlib_datetime_linux = $(TESTCACHE)/datetime/datetime-linux.o -testlib_env += HARE_TD_datetime=$(TESTCACHE)/datetime/datetime.td -testlib_deps_linux += $(testlib_datetime_linux) - -# gen_lib datetime (freebsd) -testlib_datetime_freebsd = $(TESTCACHE)/datetime/datetime-freebsd.o -testlib_env += HARE_TD_datetime=$(TESTCACHE)/datetime/datetime.td -testlib_deps_freebsd += $(testlib_datetime_freebsd) - # gen_lib dirs (any) testlib_dirs_any = $(TESTCACHE)/dirs/dirs-any.o testlib_env += HARE_TD_dirs=$(TESTCACHE)/dirs/dirs.td @@ -3190,6 +3180,16 @@ testlib_time_chrono_freebsd = $(TESTCACHE)/time/chrono/time_chrono-freebsd.o testlib_env += HARE_TD_time::chrono=$(TESTCACHE)/time/chrono/time_chrono.td testlib_deps_freebsd += $(testlib_time_chrono_freebsd) +# gen_lib time::date (linux) +testlib_time_date_linux = $(TESTCACHE)/time/date/time_date-linux.o +testlib_env += HARE_TD_time::date=$(TESTCACHE)/time/date/time_date.td +testlib_deps_linux += $(testlib_time_date_linux) + +# gen_lib time::date (freebsd) +testlib_time_date_freebsd = $(TESTCACHE)/time/date/time_date-freebsd.o +testlib_env += HARE_TD_time::date=$(TESTCACHE)/time/date/time_date.td +testlib_deps_freebsd += $(testlib_time_date_freebsd) + # gen_lib types (any) testlib_types_any = $(TESTCACHE)/types/types-any.o testlib_env += HARE_TD_types=$(TESTCACHE)/types/types.td @@ -3623,50 +3623,6 @@ $(TESTCACHE)/crypto/x25519/crypto_x25519-any.ssa: $(testlib_crypto_x25519_any_sr @$(testlib_env) $(HAREC) $(TESTHAREFLAGS) -o $@ -Ncrypto::x25519 \ -t$(TESTCACHE)/crypto/x25519/crypto_x25519.td $(testlib_crypto_x25519_any_srcs) -# datetime (+linux) -testlib_datetime_linux_srcs = \ - $(STDLIB)/datetime/arithmetic.ha \ - $(STDLIB)/datetime/chronology.ha \ - $(STDLIB)/datetime/errors.ha \ - $(STDLIB)/datetime/date.ha \ - $(STDLIB)/datetime/datetime.ha \ - $(STDLIB)/datetime/duration.ha \ - $(STDLIB)/datetime/format.ha \ - $(STDLIB)/datetime/parse.ha \ - $(STDLIB)/datetime/period.ha \ - $(STDLIB)/datetime/reckon.ha \ - $(STDLIB)/datetime/time.ha \ - $(STDLIB)/datetime/timezone.ha \ - $(STDLIB)/datetime/virtual.ha - -$(TESTCACHE)/datetime/datetime-linux.ssa: $(testlib_datetime_linux_srcs) $(testlib_rt) $(testlib_ascii_$(PLATFORM)) $(testlib_errors_$(PLATFORM)) $(testlib_fmt_$(PLATFORM)) $(testlib_io_$(PLATFORM)) $(testlib_strconv_$(PLATFORM)) $(testlib_strings_$(PLATFORM)) $(testlib_strio_$(PLATFORM)) $(testlib_time_$(PLATFORM)) $(testlib_time_chrono_$(PLATFORM)) - @printf 'HAREC \t$@\n' - @mkdir -p $(TESTCACHE)/datetime - @$(testlib_env) $(HAREC) $(TESTHAREFLAGS) -o $@ -Ndatetime \ - -t$(TESTCACHE)/datetime/datetime.td $(testlib_datetime_linux_srcs) - -# datetime (+freebsd) -testlib_datetime_freebsd_srcs = \ - $(STDLIB)/datetime/arithmetic.ha \ - $(STDLIB)/datetime/chronology.ha \ - $(STDLIB)/datetime/errors.ha \ - $(STDLIB)/datetime/date.ha \ - $(STDLIB)/datetime/datetime.ha \ - $(STDLIB)/datetime/duration.ha \ - $(STDLIB)/datetime/format.ha \ - $(STDLIB)/datetime/parse.ha \ - $(STDLIB)/datetime/period.ha \ - $(STDLIB)/datetime/reckon.ha \ - $(STDLIB)/datetime/time.ha \ - $(STDLIB)/datetime/timezone.ha \ - $(STDLIB)/datetime/virtual.ha - -$(TESTCACHE)/datetime/datetime-freebsd.ssa: $(testlib_datetime_freebsd_srcs) $(testlib_rt) $(testlib_ascii_$(PLATFORM)) $(testlib_errors_$(PLATFORM)) $(testlib_fmt_$(PLATFORM)) $(testlib_io_$(PLATFORM)) $(testlib_strconv_$(PLATFORM)) $(testlib_strings_$(PLATFORM)) $(testlib_strio_$(PLATFORM)) $(testlib_time_$(PLATFORM)) $(testlib_time_chrono_$(PLATFORM)) - @printf 'HAREC \t$@\n' - @mkdir -p $(TESTCACHE)/datetime - @$(testlib_env) $(HAREC) $(TESTHAREFLAGS) -o $@ -Ndatetime \ - -t$(TESTCACHE)/datetime/datetime.td $(testlib_datetime_freebsd_srcs) - # dirs (+any) testlib_dirs_any_srcs = \ $(STDLIB)/dirs/xdg.ha @@ -4141,7 +4097,7 @@ testlib_log_linux_srcs = \ $(STDLIB)/log/funcs.ha \ $(STDLIB)/log/silent.ha -$(TESTCACHE)/log/log-linux.ssa: $(testlib_log_linux_srcs) $(testlib_rt) $(testlib_datetime_$(PLATFORM)) $(testlib_fmt_$(PLATFORM)) $(testlib_io_$(PLATFORM)) $(testlib_os_$(PLATFORM)) +$(TESTCACHE)/log/log-linux.ssa: $(testlib_log_linux_srcs) $(testlib_rt) $(testlib_fmt_$(PLATFORM)) $(testlib_io_$(PLATFORM)) $(testlib_os_$(PLATFORM)) $(testlib_time_date_$(PLATFORM)) @printf 'HAREC \t$@\n' @mkdir -p $(TESTCACHE)/log @$(testlib_env) $(HAREC) $(TESTHAREFLAGS) -o $@ -Nlog \ @@ -4154,7 +4110,7 @@ testlib_log_freebsd_srcs = \ $(STDLIB)/log/funcs.ha \ $(STDLIB)/log/silent.ha -$(TESTCACHE)/log/log-freebsd.ssa: $(testlib_log_freebsd_srcs) $(testlib_rt) $(testlib_datetime_$(PLATFORM)) $(testlib_fmt_$(PLATFORM)) $(testlib_io_$(PLATFORM)) $(testlib_os_$(PLATFORM)) +$(TESTCACHE)/log/log-freebsd.ssa: $(testlib_log_freebsd_srcs) $(testlib_rt) $(testlib_fmt_$(PLATFORM)) $(testlib_io_$(PLATFORM)) $(testlib_os_$(PLATFORM)) $(testlib_time_date_$(PLATFORM)) @printf 'HAREC \t$@\n' @mkdir -p $(TESTCACHE)/log @$(testlib_env) $(HAREC) $(TESTHAREFLAGS) -o $@ -Nlog \ @@ -4651,6 +4607,50 @@ $(TESTCACHE)/time/chrono/time_chrono-freebsd.ssa: $(testlib_time_chrono_freebsd_ @$(testlib_env) $(HAREC) $(TESTHAREFLAGS) -o $@ -Ntime::chrono \ -t$(TESTCACHE)/time/chrono/time_chrono.td $(testlib_time_chrono_freebsd_srcs) +# time::date (+linux) +testlib_time_date_linux_srcs = \ + $(STDLIB)/time/date/arithmetic.ha \ + $(STDLIB)/time/date/chronology.ha \ + $(STDLIB)/time/date/errors.ha \ + $(STDLIB)/time/date/date.ha \ + $(STDLIB)/time/date/datetime.ha \ + $(STDLIB)/time/date/duration.ha \ + $(STDLIB)/time/date/format.ha \ + $(STDLIB)/time/date/parse.ha \ + $(STDLIB)/time/date/period.ha \ + $(STDLIB)/time/date/reckon.ha \ + $(STDLIB)/time/date/time.ha \ + $(STDLIB)/time/date/timezone.ha \ + $(STDLIB)/time/date/virtual.ha + +$(TESTCACHE)/time/date/time_date-linux.ssa: $(testlib_time_date_linux_srcs) $(testlib_rt) $(testlib_ascii_$(PLATFORM)) $(testlib_errors_$(PLATFORM)) $(testlib_fmt_$(PLATFORM)) $(testlib_io_$(PLATFORM)) $(testlib_strconv_$(PLATFORM)) $(testlib_strings_$(PLATFORM)) $(testlib_strio_$(PLATFORM)) $(testlib_time_$(PLATFORM)) $(testlib_time_chrono_$(PLATFORM)) + @printf 'HAREC \t$@\n' + @mkdir -p $(TESTCACHE)/time/date + @$(testlib_env) $(HAREC) $(TESTHAREFLAGS) -o $@ -Ntime::date \ + -t$(TESTCACHE)/time/date/time_date.td $(testlib_time_date_linux_srcs) + +# time::date (+freebsd) +testlib_time_date_freebsd_srcs = \ + $(STDLIB)/time/date/arithmetic.ha \ + $(STDLIB)/time/date/chronology.ha \ + $(STDLIB)/time/date/errors.ha \ + $(STDLIB)/time/date/date.ha \ + $(STDLIB)/time/date/datetime.ha \ + $(STDLIB)/time/date/duration.ha \ + $(STDLIB)/time/date/format.ha \ + $(STDLIB)/time/date/parse.ha \ + $(STDLIB)/time/date/period.ha \ + $(STDLIB)/time/date/reckon.ha \ + $(STDLIB)/time/date/time.ha \ + $(STDLIB)/time/date/timezone.ha \ + $(STDLIB)/time/date/virtual.ha + +$(TESTCACHE)/time/date/time_date-freebsd.ssa: $(testlib_time_date_freebsd_srcs) $(testlib_rt) $(testlib_ascii_$(PLATFORM)) $(testlib_errors_$(PLATFORM)) $(testlib_fmt_$(PLATFORM)) $(testlib_io_$(PLATFORM)) $(testlib_strconv_$(PLATFORM)) $(testlib_strings_$(PLATFORM)) $(testlib_strio_$(PLATFORM)) $(testlib_time_$(PLATFORM)) $(testlib_time_chrono_$(PLATFORM)) + @printf 'HAREC \t$@\n' + @mkdir -p $(TESTCACHE)/time/date + @$(testlib_env) $(HAREC) $(TESTHAREFLAGS) -o $@ -Ntime::date \ + -t$(TESTCACHE)/time/date/time_date.td $(testlib_time_date_freebsd_srcs) + # types (+any) testlib_types_any_srcs = \ $(STDLIB)/types/limits.ha \ diff --git a/datetime/README b/time/date/README diff --git a/datetime/arithmetic.ha b/time/date/arithmetic.ha diff --git a/datetime/chronology.ha b/time/date/chronology.ha diff --git a/datetime/date.ha b/time/date/date.ha diff --git a/datetime/datetime.ha b/time/date/datetime.ha diff --git a/datetime/duration.ha b/time/date/duration.ha diff --git a/datetime/errors.ha b/time/date/errors.ha diff --git a/datetime/format.ha b/time/date/format.ha diff --git a/datetime/parse.ha b/time/date/parse.ha diff --git a/datetime/period.ha b/time/date/period.ha diff --git a/datetime/reckon.ha b/time/date/reckon.ha diff --git a/datetime/time.ha b/time/date/time.ha diff --git a/datetime/timezone.ha b/time/date/timezone.ha diff --git a/datetime/virtual.ha b/time/date/virtual.ha