Add DateTime format_fixed#44
Conversation
|
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). |
There was a problem hiding this comment.
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()producingYYYY-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.
|
Choir: comment-only review received — routed to |
|
Choir: GitHub Copilot issue-thread comment observed on PR — parent notified with updated gate snapshot (not merge approval). |
|
Choir: fixes pushed by |
|
Choir: fixes pushed by |
|
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). |
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 --checkmoon test --target wasm-gcmoon test --target jsmoon test --target native