Class LeapSecondException

  • All Implemented Interfaces:
    Serializable

    public class LeapSecondException
    extends DateTimeException
    This exception is used to signal that there was a potentially valid leap-second in the parsed input.
    See Also:
    Serialized Form
    • Constructor Detail

      • LeapSecondException

        public LeapSecondException​(OffsetDateTime nearestDateTime,
                                   int secondsInMinute,
                                   boolean isVerifiedValidLeapYearMonth)
    • Method Detail

      • getSecondsInMinute

        public int getSecondsInMinute()
        The number of seconds, typically 60.
        Returns:
        The number of seconds in this parsed date-time
      • getNearestDateTime

        public 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