feat(time): wall-clock DateTime, TimeOfDay and fixed UTC offsets #395
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/387-wall-clock-time"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #387
Slice 2 of FIRST-PARTY gap 11, without a time zone database.
std/time:TimeOfDay,UtcOffset(whole seconds, -23:59:59..+23:59:59),DateTime(withplus(Duration)) andOffsetDateTime(parse,show,instant(),compareby instant), plusTimestamp.at(offset).Timestamp.parsenow shares its time-of-day and offset reading with the new types; its messages and behaviour are unchanged (existing tests untouched).capabilityOfImportand tested incompiler/tests/capability.test.trb.std/time/tests/wallclock.test.trb(VM: all 97std/timetests pass locally).docs/standard-library/time.md, regeneratedskills/, FIRST-PARTY gap 11 progress.No seed impact: no syntax, native, driver flag or std name the compiler looks up by string.
Approved at
8c5f973.std/time/tests/wallclock.test.trbcovers all four types (ranges, round trips, offsets with seconds, plus across month/year/leap day/limits, instant across epoch and range edges, ordering by instant); capability test added. CI green on this head (tier A, bootstrap, conformance gates, pdisc).splitSeconds,inTimestampRange,timestampOfandfractionTextare extracted from the existingTimestampcode unchanged;Timestamp.parsebehaviour is kept (seconds in the offset are only read for the new types).DateTime.plusfloor-splits the nanoseconds without overflow at the Int64 minimum,Timestamp.atstays inside the day range.capabilityOfImportentry + test).time.md, regeneratedskills/, FIRST-PARTY gap 11.Non-blocking: the offset error message
an offset is at most 23:59also fires for seconds > 59 underwithSeconds; wording could name the seconds.