new LeapSecond
Describes a single leap second, which is constructed from a JulianDate and a numerical offset representing the number of seconds TAI is ahead of the UTC time standard.
Parameters:
| Name | Type | Description | 
|---|---|---|
| date | JulianDate | A Julian date representing the time of the leap second. | 
| offset | Number | The cumulative number of seconds, that TAI is ahead of UTC at provided date. | 
Example
// Example 1. Construct a LeapSecond using a JulianDate
var date = new Date('January 1, 1990 00:00:00 UTC');
var leapSecond = new Cesium.LeapSecond(Cesium.JulianDate.fromDate(date), 25.0);
var offset = leapSecond.offset;    // 25.0
//////////////////////////////////////////////////////////////////
// Example 2. Construct a LeapSecond using a date string
var date = 'January 1, 1990 00:00:00 UTC';
var leapSecond = new LeapSecond(date, 25.0);
    
	
	
See:
Source:
Members
- 
    julianDate :JulianDate
- 
    
    The Julian date at which this leap second occurs.
- 
    offset :Number
- 
    
    The cumulative number of seconds between the UTC and TAI time standards at the time of this leap second.
- 
    <static> leapSeconds :Array
- 
    
    The list of leap seconds used throughout Cesium.
Methods
- 
    equals
- 
    
    
    Checks whether two leap seconds are equivalent to each other. Parameters:Name Type Description otherLeapSecond The leap second to compare against. Returns:Booleantrueif the leap seconds are equal; otherwise,false.Examplevar date = new Date('January 1, 1990 00:00:00 UTC'); var leapSecond1 = new Cesium.LeapSecond(Cesium.JulianDate.fromDate(date), 25.0); var leapSecond2 = new Cesium.LeapSecond(Cesium.JulianDate.fromDate(date), 25.0); leapSecond1.equals(leapSecond2); // true
- 
    <static> compareLeapSecondDate
- 
    
    
    Given two leap seconds, determines which comes before the other by comparing their respective Julian dates. Parameters:Name Type Description leapSecond1LeapSecond The first leap second to be compared. leapSecond2LeapSecond The second leap second to be compared. Returns:Number A negative value if the first leap second is earlier than the second, a positive value if the first leap second is later than the second, or zero if the two leap seconds are equal (ignoring their offsets).Examplevar date = new Date('January 1, 2006 00:00:00 UTC'); var leapSecond1 = new Cesium.LeapSecond(Cesium.JulianDate.fromDate(date), 33.0); var leapSecond2 = new Cesium.LeapSecond(Cesium.JulianDate.fromDate(date), 34.0); Cesium.LeapSecond.compareLeapSecondDate(leapSecond1, leapSecond2); // returns 0- JulianDate#lessThan
- JulianDate#isAfter
 See:
