Class EresseaDate

  • All Implemented Interfaces:
    java.lang.Cloneable, java.lang.Comparable<java.lang.Object>, ID

    public class EresseaDate
    extends Date
    This class represents an Eressea Date.
    • Constructor Detail

      • EresseaDate

        public EresseaDate​(int iInitDate)
        Creates new EresseaDate.
      • EresseaDate

        public EresseaDate​(int iInitDate,
                           int yearOffset,
                           int monthOffset,
                           int weekOffset)
        Creates new EresseaDate with adjustment. For example, the second age of Eressea started after the first week of the seventh month of the year 6, so it could be created with EresseaDate(185, 6, 7, 1) (but also with EresseaDate(185), epoch 2.
        iInitDate - The date (as read from the report).
        yearOffset - The year of round 1.
        monthOffset - The month of round 1.
        weekOffset - The week of round 1.
      • EresseaDate

        public EresseaDate​(int iInitDate,
                           int startRound)
        Creates new EresseaDate with adjustment.
        iInitDate - The date (or round, as read from the report)
        startRound - The round corresponding to year 1, month 1, week 1
    • Method Detail

      • getEpoch

        public int getEpoch()
        Returns the epoch ("Zeitalter").
      • setEpoch

        public void setEpoch​(int newEpoch)
        Sets the epoch ("Zeitalter").
      • toString

        public java.lang.String toString​(int iDateType)
        Returns a (usually localized) string representation of the date.
        Specified by:
        toString in class Date
        See Also:
        Either , , or .
      • getWeekFromStart

        protected int getWeekFromStart()
        Returns the difference to (year 0, week 27).
      • clone

        public EresseaDate clone()
        Creates a copy of this Date object.
        Specified by:
        clone in interface ID
        clone in class Date
      • main

        public static void main​(java.lang.String[] args)
        Test method.
        args -