Class Misc.SecondsConverter

  • Enclosing class:
    Misc

    public static final class Misc.SecondsConverter
    extends java.lang.Object
    Contains methods to convert seconds into a readable format.
    Since:
    1.3.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int Day
      The number of seconds in a day.
      static int Hour
      The number of seconds in a hour.
      static int Minute
      The number of seconds in a minute.
      static int SecondAwayFromADecade
      One second less than the number of seconds in a decade.
      static int Year
      The number of seconds in a year.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String toString​(long seconds)
      Converts seconds into a readable format - years:days:hours:minutes:seconds.
      static java.lang.String toString​(long seconds, boolean allowNegative)
      Converts seconds into a readable format - years:days:hours:minutes:seconds.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • Minute

        public static final int Minute
        The number of seconds in a minute.
        See Also:
        Constant Field Values
      • SecondAwayFromADecade

        public static final int SecondAwayFromADecade
        One second less than the number of seconds in a decade.
        See Also:
        Constant Field Values