Class ChineseTime

java.lang.Object
org.episteme.social.history.time.Time
org.episteme.social.history.clock.ChineseTime
All Implemented Interfaces:
Serializable

public class ChineseTime extends Time
Represents Traditional Chinese Time. Historically, the day was divided into 100 components called 'ke' (刻). Each 'ke' was subdivided into 60 'fen' (分).
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Field Details

    • KE_PER_DAY

      public static final int KE_PER_DAY
      Number of 'ke' per day.
      See Also:
    • FEN_PER_KE

      public static final int FEN_PER_KE
      Number of 'fen' per 'ke'.
      See Also:
    • SECONDS_PER_FEN

      public static final int SECONDS_PER_FEN
      Number of seconds per 'fen' (custom implementation).
      See Also:
    • MILLIS_PER_SECOND

      public static final int MILLIS_PER_SECOND
      Number of milliseconds per second.
      See Also:
    • CHINESE_SECOND

      public static final Unit<Time> CHINESE_SECOND
      The base unit for Chinese seconds (approx. 0.24 standard seconds).
    • CHINESE_MILLISECOND

      public static final Unit<Time> CHINESE_MILLISECOND
      Unit for one Chinese millisecond.
    • CHINESE_FEN

      public static final Unit<Time> CHINESE_FEN
      Unit for one Chinese 'fen' (60 Chinese seconds).
    • CHINESE_KE

      public static final Unit<Time> CHINESE_KE
      Unit for one Chinese 'ke' (60 'fen').
    • CHINESE_DAY

      public static final Unit<Time> CHINESE_DAY
      Unit for one Chinese day (100 'ke').
  • Constructor Details

    • ChineseTime

      public ChineseTime(double days, double ke, double fen, double seconds, double millis)
      Creates ChineseTime from components.
      Parameters:
      days - days
      ke - count of 'ke' (0-99)
      fen - count of 'fen' (0-59)
      seconds - Chinese seconds (0-59)
      millis - Chinese milliseconds (0-999)
      Throws:
      IllegalArgumentException - if any value is negative
    • ChineseTime

      public ChineseTime(double millis)
      Creates ChineseTime from raw milliseconds.
      Parameters:
      millis - total milliseconds
      Throws:
      IllegalArgumentException - if millis is negative
    • ChineseTime

      public ChineseTime()
      Creates ChineseTime with the current moment.
  • Method Details

    • getTime

      public Quantity<Time> getTime()
      Description copied from class: Time
      Returns the total elapsed time as a quantity.
      Specified by:
      getTime in class Time
      Returns:
      the amount of time
    • getMilliseconds

      public int getMilliseconds()
      Specified by:
      getMilliseconds in class Time
    • getSeconds

      public int getSeconds()
      Specified by:
      getSeconds in class Time
    • getMinutes

      public int getMinutes()
      Specified by:
      getMinutes in class Time
    • getHours

      public int getHours()
      Specified by:
      getHours in class Time
    • getDays

      public int getDays()
      Specified by:
      getDays in class Time
    • nextMillisecond

      public void nextMillisecond()
      Specified by:
      nextMillisecond in class Time
    • nextSecond

      public void nextSecond()
      Specified by:
      nextSecond in class Time
    • nextMinute

      public void nextMinute()
      Specified by:
      nextMinute in class Time
    • nextHour

      public void nextHour()
      Specified by:
      nextHour in class Time
    • nextDay

      public void nextDay()
      Specified by:
      nextDay in class Time
    • toString

      public String toString()
      Specified by:
      toString in class Time