leapseconds

Lists the leap seconds that have been added to UTC.

Category: Language Fundamentals > Data Types

Syntax

T = leapseconds

Returns a timetable with one row per leap second.

Description

A leap second is added to UTC now and then to keep it near the Earth's rotation time. The table lists every one since 1972, when the system began. Each is applied at the end of June 30 or December 31. The CumulativeAdjustment column shows how many seconds UTC differs from the continuous atomic time scale because of them, apart from the fixed initial offset.

Output arguments

T
A timetable with the variables Type (+ for an inserted second) and CumulativeAdjustment, the running total, with the date of each leap second as the row time.

Example

The most recent leap second

L = leapseconds;
size(L)
L(end, :)
Output
ans = 1×2

    27     2
ans = 1×2 timetable

       Date        Type    CumulativeAdjustment
    ___________    ____    ____________________

    31-Dec-2016     +             27 sec

See also

datetime posixtime timetable juliandate