Class CopticCalendar

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
EthiopicCalendar

public class CopticCalendar extends JulianCalendar
Implementation of the Coptic calendar. The Coptic calendar is used by the Coptic Orthodox Church and is based on the ancient Egyptian calendar with leap year rules.

Key features:

  • Epoch: August 29, 284 CE (Julian) - Era of Martyrs
  • 13 months: 12 of 30 days + Nasie (5 or 6 days)
  • Leap year every 4 years (without century exception)
* @version 2.0
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Field Details

    • EPOCH

      public static long EPOCH
      The RD number of the Coptic epoch (August 29, 284 CE Julian).
  • Constructor Details

    • CopticCalendar

      public CopticCalendar()
      Creates a new CopticCalendar object.
    • CopticCalendar

      public CopticCalendar(long l)
      Creates a new CopticCalendar object.
      Parameters:
      l - the Rata Die number.
    • CopticCalendar

      public CopticCalendar(AlternateCalendar altcalendar)
      Creates a new CopticCalendar object.
      Parameters:
      altcalendar - another calendar to initialize from.
    • CopticCalendar

      public CopticCalendar(int i, int j, int k)
      Creates a new CopticCalendar object.
      Parameters:
      i - the month (1-13).
      j - the day.
      k - the year.
  • Method Details

    • isLeapYear

      public static boolean isLeapYear(int i)
      Checks if the given year is a leap year in the Coptic calendar.
      Parameters:
      i - the year to check.
      Returns:
      true if it is a leap year.
    • recomputeRD

      protected void recomputeRD()
      Recomputes the Rata Die number from the current month, day, and year.
      Overrides:
      recomputeRD in class JulianCalendar
    • recomputeFromRD

      protected void recomputeFromRD()
      Recomputes the month, day, and year from the current Rata Die number.
      Overrides:
      recomputeFromRD in class JulianCalendar
    • monthName

      protected String monthName()
      Returns the name of the current month.
      Overrides:
      monthName in class GregorianCalendar
      Returns:
      the month name string.
    • getSuffix

      protected String getSuffix()
      Returns the era suffix for Coptic years (empty).
      Overrides:
      getSuffix in class JulianCalendar
      Returns:
      an empty string.
    • getMonths

      public Enumeration<String> getMonths()
      Returns an enumeration of all Coptic month names.
      Overrides:
      getMonths in class GregorianCalendar
      Returns:
      enumeration of month names.
    • toString

      public String toString()
      Returns a string representation of the Coptic date.
      Overrides:
      toString in class JulianCalendar
      Returns:
      the date string.
    • main

      public static void main(String[] args)
      Main method for testing the Coptic calendar implementation.
      Parameters:
      args - command line arguments.