feat(std/time): Date, Weekday and RFC 3339 parsing of Timestamp #390
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/111-date-rfc3339"
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 #111
First slice of gap 11 in
docs/design/FIRST-PARTY.md: calendar dates and RFC 3339 parsing instd/time.What
Date(proleptic Gregorian, years 0000 to 9999, UTC, stored as days since 1970-01-01):of,fromDaysSinceEpoch,parse(YYYY-MM-DD),year/month/day,weekday,isLeapYear,daysInMonth,plusDays,daysUntil,startOfDay, plusCompare,Equals,Hash,Show.Weekday(Monday to Sunday, ISO numbers 1 to 7),TimeParseError(Show,Error, with amessagethat quotes the text and gives the reason).Timestamp.parse(RFC 3339, including the section 5.8 examples, offsets, fractions up to nanoseconds, lowercaset/z) andTimestamp.date. Leap seconds and instants outside theTimestamprange are refused with a reason.capabilityOfImportlistsDate,WeekdayandTimeParseErroras capability-free (test incompiler/tests/capability.test.trb).docs/standard-library/time.md,docs/tooling/torb-publish.md; gap 11 marked partly done inFIRST-PARTY.mdwith the follow-ups #387, #388, #389.skills/and the standard-library index are regenerated.Also fixed
Timestamp.showoverflowed forInt64.minimumnanoseconds (the remainder was negated). It now floors the seconds and keeps the fraction non-negative; a test covers the first instant of the range.Test
Local, quick checks only:
torb testonstd/time/tests(60 tests) andcompiler/tests/capability.test.trb(13 tests): passtorb format --check,torb linton the touched files: cleantorb docs skill --check: OKtools/check-commits.sh: OKThe bootstrap and the gates run in the forge CI. No seed change.
Checklist (head
8927a41):Non-blocking: none.