Our mission is to prove the correctness of a selection of the functions in the ECMAScript Temporal Proposal.
Based on our findings, the specification text of the proposal has been changed. Our mechanization is now updated without the inconsistencies we found, but there are links to the proofs of the inconsistencies in the Previous Inconsistencies section below.
- Aria Bjørnbakken Eide (University of Bergen, Norway)
- Vebjørn Søreide Øiestad (University of Bergen, Norway)
- Mikhail Barash (Bergen Language Design Laboratory, University of Bergen, Norway)
We have presented the preliminary results of this work at RocqPL @ POPL 2026 (video, abstract).
$ rocq makefile -f _CoqProject -o Makefile
$ make
or just
$ ./build.sh
| section | title | spec text | mechanization |
|---|---|---|---|
| 3.5.1 | ISO Date Records | spec | ISODateRecord.v |
| 3.5.2 | CreateISODateRecord |
spec | CreateISODateRecord.v |
RegulateISODate |
spec | RegulateISODate.v | |
IsValidISODate |
spec | IsValidISODate.v | |
PadISOYear |
spec | PadISOYear.v | |
TemporalDateToString |
spec | TemporalDateToString.v | |
CompareISODate |
spec | CompareISODate.v |
| section | title | spec text | mechanization |
|---|---|---|---|
| 4.5.1 | Time Records | spec | TimeRecord.v |
| 4.5.2 | CreateTimeRecord |
spec | CreateTimeRecord.v |
| 4.5.3 | MidnightTimeRecord |
spec | MidnightTimeRecord.v |
| 4.5.4 | NoonTimeRecord |
spec | NoonTimeRecord.v |
| 4.5.5 | DifferenceTime |
spec | DifferenceTime.v |
| 4.5.8 | RegulateTime |
spec | RegulateTime.v |
| 4.5.9 | IsValidTime |
spec | IsValidTime.v |
| 4.5.10 | BalanceTime |
spec | BalanceTime.v |
| 4.5.13 | TimeRecordToString |
spec | TimeRecordToString.v |
| 4.5.14 | CompareTimeRecord |
spec | CompareTimeRecord.v |
| 4.5.15 | AddTime |
spec | AddTime.v |
| section | title | spec text | mechanization |
|---|---|---|---|
| 5.5.1 | ISO Date-Time Records | spec | ISODateTimeRecord.v |
| 5.5.3 | CombineISODateAndTimeRecord |
spec | CombineISODateAndTimeRecord.v |
| 5.5.9 | ISODateTimeToString |
spec | ISODateTimeToString.v |
| 5.5.10 | CompareISODateTime |
spec | CompareISODateTime.v |
| section | title | spec text | mechanization |
|---|---|---|---|
| 7.5.1 | Date Duration Records | spec | DateDurationRecord.v |
| 7.5.14 | DateDurationSign |
spec | DateDurationSign.v |
| 7.5.21 | TimeDurationFromComponents |
spec | TimeDurationFromComponents.v |
| 7.5.22 | AddTimeDuration |
spec | AddTimeDuration.v |
| 7.5.23 | Add24HourDaysToTimeDuration |
spec | Add24HourDaysToTimeDuration.v |
| 7.5.24 | AddTimeDurationToEpochNanoseconds |
spec | AddTimeDurationToEpochNanoseconds.v |
| 7.5.25 | CompareTimeDuration |
spec | CompareTimeDuration.v |
| 7.5.26 | TimeDurationFromEpochNanosecondsDifference |
spec | TimeDurationFromEpochNanosecondsDifference.v |
| 7.5.28 | TimeDurationSign |
spec | TimeDurationSign.v |
| section | title | spec text | mechanization |
|---|---|---|---|
| 8.5.1 | IsValidEpochNanoseconds |
spec | IsValidEpochNanoseconds.v |
| 8.5.4 | CompareEpochNanoseconds |
spec | CompareEpochNanoseconds.v |
| 8.5.5 | AddInstant |
spec | AddInstant.v |
| section | title | spec text | mechanization |
|---|---|---|---|
| 9.5.1 | ISO Year-Month Records | spec | ISOYearMonthRecord.v |
| 9.5.3 | ISOYearMonthWithinLimits |
spec | ISOYearMonthWithinLimits.v |
| 9.5.4 | BalanceISOYearMonth |
spec | BalanceISOYearMonth.v |
| section | title | spec text | mechanization |
|---|---|---|---|
| 11.1.5 | FormatOffsetTimeZoneIdentifier |
spec | FormatOffsetTimeZoneIdentifier.v |
| 11.1.6 | FormatUTCOffsetNanoseconds |
spec | FormatUTCOffsetNanoseconds.v |
| section | title | spec text | mechanization |
|---|---|---|---|
| 12.1 | Calendar Types | spec | CalendarType.v |
| 12.3.15 | FormatCalendarAnnotation |
spec | FormatCalendarAnnotation.v |
| 12.3.17 | ISODaysInMonth |
spec | ISODaysInMonth.v |
| section | title | spec text | mechanization |
|---|---|---|---|
| 13.2 | EpochDaysToEpochMs |
spec | EpochDaysToEpochMs.v |
| 13.3 | Date Equations | spec | DateEquations.v |
| 13.8 | NegateRoundingMode |
spec | NegateRoundingMode.v |
| 13.14 | ValidateTemporalRoundingIncrement |
spec | ValidateTemporalRoundingIncrement.v |
| 13.16 | ToSecondsStringPrecisionRecord |
spec | ToSecondsStringPrecisionRecord.v |
| 13.18 | ValidateTemporalUnitValue |
spec | ValidateTemporalUnitValue.v |
| 13.20 | LargerOfTwoTemporalUnits |
spec | LargerOfTwoTemporalUnits.v |
| 13.21 | IsCalendarUnit |
spec | IsCalendarUnit.v |
| 13.22 | TemporalUnitCategory |
spec | TemporalUnitCategory.v |
| 13.23 | MaximumTemporalDurationRoundingIncrement |
spec | MaximumTemporalDurationRoundingIncrement.v |
| 13.25 | FormatFractionalSeconds |
spec | FormatFractionalSeconds.v |
| 13.26 | FormatTimeString |
spec | FormatTimeString.v |
| 13.27 | GetUnsignedRoundingMode |
spec | GetUnsignedRoundingMode.v |
- 3.5.1 ISODateRecord_IsValidISODate_not_guaranteed
- 4.5.10 BalanceTime_creates_invalid_TimeRecord
- 11.1.5 FormatOffsetTimeZoneIdentifier_hour_outside_bounds_of_FormatTimeString
- 11.1.6 FormatUTCOffsetNanoseconds_hour_outside_bounds_of_FormatTimeString
- 7.5.21 TimeDurationFromComponents_nanoseconds'_outside_bounds_of_MaxTimeDuration
- 7.5.26 TimeDurationFromEpochNanosecondsDifference_result_outside_bounds_of_MaxTimeDuration