Package com.ethlo.time
Class LeapSecondException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.time.DateTimeException
-
- com.ethlo.time.LeapSecondException
-
- All Implemented Interfaces:
java.io.Serializable
public class LeapSecondException extends java.time.DateTimeException
This exception is used to signal that there was a potentially valid leap-second in the parsed input.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
isVerifiedValidLeapYearMonth
private java.time.OffsetDateTime
nearestDateTime
private int
secondsInMinute
-
Constructor Summary
Constructors Constructor Description LeapSecondException(java.time.OffsetDateTime nearestDateTime, int secondsInMinute, boolean isVerifiedValidLeapYearMonth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.time.OffsetDateTime
getNearestDateTime()
Get the nearest date-time that is a roll-over to the next minute, (and potentially lower granularity fields) and 0 seconds.int
getSecondsInMinute()
The number of seconds, typically60
.boolean
isVerifiedValidLeapYearMonth()
Whether this is a date-time with a well-known leap-second
-
-
-
Method Detail
-
getSecondsInMinute
public int getSecondsInMinute()
The number of seconds, typically60
.- Returns:
- The number of seconds in this parsed date-time
-
getNearestDateTime
public java.time.OffsetDateTime getNearestDateTime()
Get the nearest date-time that is a roll-over to the next minute, (and potentially lower granularity fields) and 0 seconds.- Returns:
- The date-time
-
isVerifiedValidLeapYearMonth
public boolean isVerifiedValidLeapYearMonth()
Whether this is a date-time with a well-known leap-second- Returns:
- True if known, otherwise false
-
-