Skip to content

time: accept one to nine ISO 8601 fractional digits - #675

Merged
LunaStev merged 1 commit into
wavefnd:masterfrom
QIU-Guanzong:fix/673-fractional-iso8601
Sep 20, 2026
Merged

LunaStev merged 1 commit into
wavefnd:masterfrom
QIU-Guanzong:fix/673-fractional-iso8601

Conversation

@QIU-Guanzong

Copy link
Copy Markdown
Contributor

Summary

  • Accept one through nine UTC fractional-second digits in time_datetime_parse_iso8601 and right-pad them to nanoseconds.
  • Preserve whole-second parsing, the fixed nine-digit formatter, and TIME_FORMAT_ISO8601_LENGTH.
  • Add runtime regressions for every supported precision, normalization, round trips, and malformed suffixes.

Motivation

Fixes #673. Valid millisecond and microsecond UTC timestamps currently fail because the parser accepts only whole seconds or exactly nine fractional digits.

Target and compatibility impact

The parser now accepts the documented UTC subset with one through nine ASCII fractional digits. Timezone offsets and other ISO 8601 forms remain unsupported. No formatter, ABI, or target contract changes.

Validation

  • cargo fmt --all --check
  • ./tools/check_std_policy.sh
  • cargo +1.89.0 clippy --locked --workspace --all-targets -- -D warnings
  • RUSTDOCFLAGS="-D warnings" cargo +1.89.0 doc --locked --workspace --no-deps --jobs 2
  • python3 -m py_compile ... and python3 -m unittest tools.test_case_manifest tools.test_test_contracts tools.test_process_tree
  • cargo +1.89.0 build --locked --release --jobs 2
  • python3 tools/check_wave_corpus.py --wavec target/release/wavec --run-std-examples (280 corpus files and 26 std examples)
  • python3 tools/run_tests.py --suite linux/amd64 --only linux/amd64/test19.wave with an isolated stdlib home

The full workspace Rust suite was also attempted with Rust 1.89. On this local macOS host it stops in the unmodified native standard-I/O capture/TCP regression group; the focused time case and all parser-related checks above pass.

Checklist

  • Commits include a DCO Signed-off-by line.
  • Tests cover new behavior.
  • The parser API comment documents the expanded subset.
  • The change preserves the license boundary between the compiler and std/.

@LunaStev
LunaStev self-requested a review September 20, 2026 14:17

@LunaStev LunaStev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thank you for your contribution!

@LunaStev
LunaStev merged commit 3867956 into wavefnd:master Sep 20, 2026
22 of 27 checks passed
@LunaStev LunaStev mentioned this pull request Sep 30, 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.

Accept one to nine fractional digits in UTC ISO 8601 parsing

3 participants