Skip to content

Add DateTime format_fixed#44

Merged
brickfrog merged 3 commits into
mainfrom
main.ergo-task-add-datetime-formatfixed-1780418501483-596086
Jun 2, 2026
Merged

Add DateTime format_fixed#44
brickfrog merged 3 commits into
mainfrom
main.ergo-task-add-datetime-formatfixed-1780418501483-596086

Conversation

@brickfrog

Copy link
Copy Markdown
Owner

Closes bead tempo-dwz.3.\n\nAdds DateTime::format_fixed for fixed-width UTC timestamps with exactly nine fractional-second digits, documents the 0..9999 lexicographic ordering guarantee, and covers whole-second, fractional padding, lexicographic ordering, and fixed-width in-range outputs.

Verification

Generated by Choir from commands executed in the leaf workspace.

  • moon fmt --check
    • exit: 0
    • head: f2cc7fa
    • output tail:
Finished. moon: no work to do
  • moon test --target wasm-gc
    • exit: 0
    • head: f2cc7fa
    • output tail:
Total tests: 288, passed: 288, failed: 0.
  • moon test --target js
    • exit: 0
    • head: f2cc7fa
    • output tail:
Total tests: 288, passed: 288, failed: 0.
  • moon test --target native
    • exit: 0
    • head: f2cc7fa
    • output tail:
Total tests: 288, passed: 288, failed: 0.

@brickfrog

Copy link
Copy Markdown
Owner Author

Choir: GitHub Actions rollup reports all checks successful on the latest head — re-check review/merge policy on GitHub (not an approval or merge signal by itself).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new DateTime::format_fixed API to emit a UTC timestamp string with an always-present 9-digit fractional-seconds field, aimed at producing fixed-width outputs (within year 0..9999) that preserve chronological ordering under lexicographic comparison.

Changes:

  • Added DateTime::format_fixed() producing YYYY-MM-DDTHH:MM:SS.nnnnnnnnnZ (always 9 fractional digits).
  • Added tests covering whole-second formatting, fractional padding, lexicographic ordering (in-range years), and fixed-width (in-range years).
  • Updated the generated public API surface (pkg.generated.mbti) to include the new function.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/tempo.mbt Adds DateTime::format_fixed implementation and its docstring/guarantees.
src/tempo_test.mbt Adds coverage for format_fixed behavior and ordering/width properties.
src/pkg.generated.mbti Exposes the new DateTime::format_fixed signature in generated API metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/tempo.mbt Outdated
@brickfrog

Copy link
Copy Markdown
Owner Author

Choir: comment-only review received — routed to main.ergo-task-add-datetime-formatfixed-1780418501483-596086 (leaf pane).

@brickfrog

Copy link
Copy Markdown
Owner Author

Choir: GitHub Copilot issue-thread comment observed on PR — parent notified with updated gate snapshot (not merge approval).

@brickfrog

Copy link
Copy Markdown
Owner Author

Choir: fixes pushed by main.ergo-task-add-datetime-formatfixed-1780418501483-596086 — resolving threads and checking gates (not merged yet).

@brickfrog

Copy link
Copy Markdown
Owner Author

Choir: fixes pushed by main.ergo-task-add-datetime-formatfixed-1780418501483-596086 — resolving threads and checking gates (not merged yet).

@brickfrog

Copy link
Copy Markdown
Owner Author

Choir: GitHub Actions rollup reports all checks successful on the latest head — re-check review/merge policy on GitHub (not an approval or merge signal by itself).

@brickfrog brickfrog merged commit 84e718e into main Jun 2, 2026
2 checks passed
@brickfrog brickfrog deleted the main.ergo-task-add-datetime-formatfixed-1780418501483-596086 branch June 2, 2026 16:52
@brickfrog brickfrog mentioned this pull request Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants