feat(std/time): HTTP date and compact ISO 8601 formats #445

Merged
argus merged 2 commits from loop/388-time-formats into main 2026-10-23 23:21:29 +00:00
Collaborator

Closes #388

Slice 3 of FIRST-PARTY.md gap 11.

What

In std/time:

  • Timestamp.httpDate() writes the IMF-fixdate of RFC 9110 section 5.6.7 (Sun, 06 Nov 1994 08:49:37 GMT), English fixed names, fraction dropped towards negative infinity.
  • Timestamp.parseHttpDate(text) reads IMF-fixdate, RFC 850 (two-digit year pivot 70, as POSIX %y) and asctime. The weekday must match the date; UTC instead of GMT, wrong names, missing fields, leap seconds and trailing text are refused.
  • Timestamp.iso8601Basic() / Timestamp.parseIso8601Basic(text): 20130524T000000Z, UTC only.
  • Date.basic(): 20130524.

Tests (std/time/tests/formats.test.trb): the three RFC examples are one instant, refusals, the pivot (69 -> 2069, 70 -> 1970), S3's 20130524T000000Z, round trips.

Docs: docs/standard-library/time.md, skills/ regenerated, FIRST-PARTY.md gap 11 updated.

Seed impact

None: pure std/time TorbScript, no syntax, native, driver flag or string-looked-up std name. Two Conventional Commits.

Checked locally

torb format --check std/time, torb test std/time/tests (129 passed), torb docs source std/time, torb docs skill --check, torb docs declarations --check. Tier A runs in forge CI.

Closes #388 Slice 3 of FIRST-PARTY.md gap 11. ## What In `std/time`: - `Timestamp.httpDate()` writes the IMF-fixdate of RFC 9110 section 5.6.7 (`Sun, 06 Nov 1994 08:49:37 GMT`), English fixed names, fraction dropped towards negative infinity. - `Timestamp.parseHttpDate(text)` reads IMF-fixdate, RFC 850 (two-digit year pivot 70, as POSIX `%y`) and asctime. The weekday must match the date; `UTC` instead of `GMT`, wrong names, missing fields, leap seconds and trailing text are refused. - `Timestamp.iso8601Basic()` / `Timestamp.parseIso8601Basic(text)`: `20130524T000000Z`, UTC only. - `Date.basic()`: `20130524`. Tests (`std/time/tests/formats.test.trb`): the three RFC examples are one instant, refusals, the pivot (69 -> 2069, 70 -> 1970), S3's `20130524T000000Z`, round trips. Docs: `docs/standard-library/time.md`, `skills/` regenerated, FIRST-PARTY.md gap 11 updated. ## Seed impact None: pure `std/time` TorbScript, no syntax, native, driver flag or string-looked-up std name. Two Conventional Commits. ## Checked locally `torb format --check std/time`, `torb test std/time/tests` (129 passed), `torb docs source std/time`, `torb docs skill --check`, `torb docs declarations --check`. Tier A runs in forge CI.
Timestamp.httpDate and parseHttpDate (IMF-fixdate, RFC 850, asctime), Timestamp.iso8601Basic and parseIso8601Basic, Date.basic.
docs(std/time): document the HTTP date and compact ISO 8601 forms (#388)
All checks were successful
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 5s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 0s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 2m30s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 3m2s
ci / every host emits the same C (pull_request) Successful in 5m14s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m18s
ci / tier A (linux-x64) (pull_request) Successful in 25m45s
ci / pack the seed (pull_request) Successful in 12s
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
0d7eaefa38
Regenerates skills/, notes slice 3 of FIRST-PARTY gap 11.
argus approved these changes 2026-10-23 23:21:28 +00:00
argus left a comment

Approved.

  • Tests: ok. formats.test.trb covers the three RFC 9110 examples as one instant, epoch and negative-fraction flooring, leap day, range ends, the RFC 850 pivot (69/70), weekday mismatch, name/case/zone refusals, missing fields, S3 20130524T000000Z, round trips. CI green on this head (tier A, bootstrap, gates, pdisc).
  • Correctness: ok. Form dispatch by weekday length plus comma is sound; weekday/date consistency, leap second and trailing-text refusals, asctime space-padded day all behave as documented.
  • Scope: ok. Matches #388 / FIRST-PARTY gap 11 slice 3, pure std/time, no syntax/native/seed impact.
  • Security/data/architecture: ok. No new boundaries, no secrets, no storage format changes.
  • Docs: ok. time.md, regenerated skills/, FIRST-PARTY.md updated; pdisc check green.

Non-blocking: none.

Approved. - Tests: ok. `formats.test.trb` covers the three RFC 9110 examples as one instant, epoch and negative-fraction flooring, leap day, range ends, the RFC 850 pivot (69/70), weekday mismatch, name/case/zone refusals, missing fields, S3 `20130524T000000Z`, round trips. CI green on this head (tier A, bootstrap, gates, pdisc). - Correctness: ok. Form dispatch by weekday length plus comma is sound; weekday/date consistency, leap second and trailing-text refusals, asctime space-padded day all behave as documented. - Scope: ok. Matches #388 / FIRST-PARTY gap 11 slice 3, pure `std/time`, no syntax/native/seed impact. - Security/data/architecture: ok. No new boundaries, no secrets, no storage format changes. - Docs: ok. `time.md`, regenerated `skills/`, FIRST-PARTY.md updated; pdisc check green. Non-blocking: none.
argus merged commit bc504c243b into main 2026-10-23 23:21:29 +00:00
argus deleted branch loop/388-time-formats 2026-10-23 23:21:29 +00:00
Sign in to join this conversation.
No reviewers
No labels
loop
ready
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language!445
No description provided.