Leap Second Timeline
UTC has been kept within a second of the Earth’s turning by inserting a second now and then. Each one is written 23:59:60, and each one moves the gap between TAI and UTC up by a second. The gap was 10 seconds when UTC began counting whole seconds on 1972-01-01, and it has been 37 seconds since the end of 2016.
The timeline draws every inserted second the library lists, with TAI minus UTC as a step line under them. Type a date and the pin lands on the axis, with the gap on that date and the next insertion after it. Type two dates and the band between them lights the seconds that were counted. Type a 23:59:60 and the tool says whether it was inserted, merely well-formed, or not a second 60 at all. Drag the slider to move the date a day at a time.
The offset. taiMinusUtc returns the whole seconds TAI is ahead of UTC at an instant. It returns null before 1972-01-01, because before then UTC and TAI did not differ by a whole number of seconds. The tool shows that as NO SIGNAL with one sentence saying why. nextLeapSecond returns the next inserted second after the date, or "" when the table lists none. An empty answer there is a real answer, and the tool says “none after this date”.
The count. leapSecondsBetween counts the seconds inserted between two instants. Swap the two dates and the count is negative. The tool lights the counted marks and the table rows, and says so in words as well as colour.
The second 60. isLeapSecond is true only for a 23:59:60 on a day when a second was inserted. A 23:59:60 on any other day is well-formed text and still returns false. The offset spelling 08:59:60+09:00 is the same second as 23:59:60Z on the day before, and the library reads it that way.
Continuous UTC. The dashed span at the right of the axis marks the date from which UTC is planned to run with no more inserted seconds. The offset stays where it is, at 37 seconds, and the answer to “when is the next one” stays empty.
taiMinusUtc("2000-01-01T00:00:00Z"); // 32nextLeapSecond("2000-01-01T00:00:00Z"); // "2005-12-31T23:59:60Z"nextLeapSecond("2024-01-01T00:00:00Z"); // ""leapSecondsBetween("2000-01-01T00:00:00Z", "2024-01-01T00:00:00Z"); // 5leapSecondsBetween("2024-01-01T00:00:00Z", "2000-01-01T00:00:00Z"); // -5isLeapSecond("2016-12-31T23:59:60Z"); // trueisLeapSecond("2017-12-31T23:59:60Z"); // falsetaiMinusUtc("1971-01-01T00:00:00Z"); // nullWorth trying: the offset on 2016-01-01 — 36 seconds, with the last insertion still to come. A second 60 on a day with no insertion — well-formed, and isLeapSecond is false. The same kind of second, written with an offset — it is the end of 2008 in UTC, and it was inserted. A date far past the axis — still 37 seconds. The two dates swapped — the count turns negative. A date before 1972 — the library answers null, and the tool shows NO SIGNAL.
Reference: taiMinusUtc, nextLeapSecond, leapSecondsBetween and isLeapSecond. The guide is Leap Seconds and TAI.
© 2026 NorthGuild · Licences
Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.