Temporal.Duration strings are currently allowed to specify fractional hours, minutes, and seconds, up to 9 digits.
Advantages:
Example strings that are currently rejected by Temporal.Duration.from(), that nonetheless represent exact numbers of nanoseconds:
PT0.00000000001H → 36 nanoseconds
PT0.0000000001M → 6 nanoseconds
Concerns:
Increasing the allowed precision beyond 9 digits for fractional seconds, 10 digits for fractional minutes, or 11 digits for fractional hours, may pose implementation difficulties since implementations would have to calculate with fractional nanoseconds.
(Moved from https://github.com/tc39/proposal-temporal/issues/1712)
Temporal.Duration strings are currently allowed to specify fractional hours, minutes, and seconds, up to 9 digits.
Advantages:
Example strings that are currently rejected by Temporal.Duration.from(), that nonetheless represent exact numbers of nanoseconds:
PT0.00000000001H
→ 36 nanosecondsPT0.0000000001M
→ 6 nanosecondsConcerns:
Increasing the allowed precision beyond 9 digits for fractional seconds, 10 digits for fractional minutes, or 11 digits for fractional hours, may pose implementation difficulties since implementations would have to calculate with fractional nanoseconds.
Prior art:
Constraints / corner cases: