java.time DST + data readers: make tick pass fully
Shaking out tick's api and alpha.interval suites (api 353->359, interval
0->103 passing) cleared a set of general gaps:
- Named-zone DST. Zones resolved to a fixed representative offset, so
America/New_York in August read -05:00 not -04:00. Add US/EU DST rules
(compact transition-date math) and make instant<->zoned, the zone rules'
getOffset, and the zoned equality arm DST-aware.
- Nanosecond zoned/offset times. Instant is nanos but atZone/atOffset/
toInstant/withZoneSameInstant and Instant/parse went through epoch-ms,
truncating sub-ms. Route them through nanos.
- Locale month/day names. A formatter dropped its Locale; carry it and add
French names so MMM under Locale/FRENCH renders "mai".
- Callable records. A defrecord implementing clojure.lang.IFn (tick's
GeneralRelation) is now invokable: jolt-invoke dispatches to its inline
invoke method. Also give collections the Iterable host tag so a protocol
extended to Iterable matches vectors/seqs.
- Imported class short names. (:import [java.time ZonedDateTime]) then
(. ZonedDateTime parse s) resolved to nil; an otherwise-unresolved bare
Capitalized name that's a registered host class now resolves as a class.
- Data readers. A project's data_readers.{clj,cljc} is loaded into
*data-readers* (reader namespaces required eagerly); registered #tag
literals in source rewrite to (reader-fn 'form). clojure.core/read-string
now applies #inst/#uuid/#"regex" and *data-readers* like Clojure.
- Duration/between accepts zoned/offset date-times.
All runtime shims, no re-mint. docs/libraries.md: tick full pass + aero.
This commit is contained in:
parent
8d7d03bfbc
commit
7b1ec9a1d3
8 changed files with 354 additions and 43 deletions
|
|
@ -4,6 +4,9 @@ Libraries confirmed to load and pass their conformance checks on Jolt
|
|||
(see the [examples](https://github.com/jolt-lang/examples), e.g. the
|
||||
[ring-app example](https://github.com/jolt-lang/examples/tree/main/ring-app)).
|
||||
|
||||
* [aero](https://github.com/juxt/aero) — EDN configuration with tag literals;
|
||||
`read-config` resolves `#ref`/`#env`/`#or`/`#profile`/`#long`/… and map/vector/set
|
||||
configs round-trip
|
||||
* [config](https://github.com/yogthos/config)
|
||||
* [Selmer](https://github.com/yogthos/Selmer)
|
||||
* [medley](https://github.com/weavejester/medley)
|
||||
|
|
@ -59,6 +62,7 @@ Libraries confirmed to load and pass their conformance checks on Jolt
|
|||
* [clojure.spec.alpha](https://github.com/clojure/spec.alpha) — data specs;
|
||||
`s/def`, `s/valid?`, `s/conform`, `s/cat`/`s/keys`, `s/explain-str`, and
|
||||
`s/check-asserts` work over the registry.
|
||||
* [tick](https://github.com/juxt/tick) — date/time over Jolt's `java.time`. The
|
||||
API test suite passes 353/359; the remaining failures are named-zone DST (full
|
||||
tzdb) and locale-specific formatting.
|
||||
* [tick](https://github.com/juxt/tick) — date/time over Jolt's `java.time`. Its
|
||||
`api` and `alpha.interval` test suites pass in full, including named-zone DST,
|
||||
nanosecond instants, and French locale formatting. Loads with `JOLT_FEATURES`
|
||||
including `clj`; `#time/…` literals work via `time-literals`' data readers.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue