net.time4j.scale.LeapSecondEvent Maven / Gradle / Ivy
/*
* -----------------------------------------------------------------------
* Copyright © 2013-2014 Meno Hochschild,
* -----------------------------------------------------------------------
* This file (LeapSecondEvent.java) is part of project Time4J.
*
* Time4J is free software: You can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* Time4J is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Time4J. If not, see .
* -----------------------------------------------------------------------
*/
package net.time4j.scale;
import net.time4j.base.GregorianDate;
/**
* This interface describes that during the last minute of a given
* calendar day an UTC-leapsecond was either introducted or left out.
*
* Example: If the day is given as [1972-06-30] then this means a leapsecond
* in the last minute short before midnight of following day, namely at
* [1972-06-30T23:59:60Z].
*
* @author Meno Hochschild
*/
/*[deutsch]
* Beschreibt, daß in der letzten Minute des hier bestimmten Tags eine
* UTC-Schaltsekunde eingefügt oder eine Sekunde ausgelassen wurde.
*
* Beispiel: Ist der Tag [1972-06-30] angeben, dann bedeutet das eine neue
* Schaltsekunde in der letzten Minute kurz vor Mitternacht des Folgetags,
* nämlich um [1972-06-30T23:59:60Z].
*
* @author Meno Hochschild
*/
public interface LeapSecondEvent {
//~ Methoden ----------------------------------------------------------
/**
* Returns the date of leapsecond introduction.
*
* @return gregorian date where a leap second is inserted at the end
*/
/*[deutsch]
* Ermittelt das Datum der Zeitumstellung.
*
* @return gregorian date where a leap second is inserted at the end
*/
GregorianDate getDate();
/**
* Returns the leapsecond shift of this event only.
*
* Note: Until the year 2014 there was only the shift of one
* second extra so the return value of this method is always {@code +1}.
* But negative leapseconds with the shift {@code -1} remain
* theoretically possible according to UTC definition.
*
* @return event-related shift in seconds ({@code != 0})
*/
/*[deutsch]
* Liefert die Schaltsekundenverschiebung nur dieses Ereignisses.
*
* Anmerkung: Bis zum Jahr 2014 gab es nur den Versatz von jeweils
* einer Sekunde extra, also ist der Rückgabewert dieser Methode
* bis dahin immer {@code +1}. Aber auch negative Schaltsekunden mit
* der Verschiebung {@code -1} bleiben nach der Norm prinzipiell
* möglich.
*
* @return event-related shift in seconds ({@code != 0})
*/
int getShift();
}