Interface EastAsianYear

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface EastAsianYear

Represents a way to specify the year used in Chinese calendar and its derivates.

Since:
3.40/4.35
Author:
Meno Hochschild
See Also:
CyclicYear.inQingDynasty(ChineseEra), CyclicYear.inCycle(int)
  • Method Summary

    Modifier and Type
    Method
    Description
    forDangi​(int dangiYear)
    Determines the East Asian year corresponding to given dangi year which starts counting in year BC 2333 or later.
    forGregorian​(int relatedGregorianYear)
    Determines the East Asian year corresponding to given related gregorian year.
    forJuche​(int jucheYear)
    Determines the East Asian year corresponding to given Juche year which starts counting in gregorian year 1912 or later.
    forMinguo​(int minguoYear)
    Determines the East Asian year corresponding to given minguo year which starts counting in gregorian year 1912 or later.
    default int
    Determines the number of associated sexagesimal year cycle.
    int
    Marks the traditional introduction date of sexagesimal cyclic years in Julian year 2637 BCE by the legendary yellow emperor Huang-di.
    default CyclicYear
    Determines the cyclic year.
  • Method Details

    • forGregorian

      static EastAsianYear forGregorian(int relatedGregorianYear)

      Determines the East Asian year corresponding to given related gregorian year.

      Parameters:
      relatedGregorianYear - the gregorian calendar year which contains the first day of East Asian year
      Returns:
      EastAsianYear
    • forMinguo

      static EastAsianYear forMinguo(int minguoYear)

      Determines the East Asian year corresponding to given minguo year which starts counting in gregorian year 1912 or later.

      Used in Taiwan.

      Parameters:
      minguoYear - the minguo year which contains the first day of East Asian year
      Returns:
      EastAsianYear
      Throws:
      IllegalArgumentException - if the year is smaller than 1
    • forDangi

      static EastAsianYear forDangi(int dangiYear)

      Determines the East Asian year corresponding to given dangi year which starts counting in year BC 2333 or later.

      Parameters:
      dangiYear - the dangi year which contains the first day of East Asian year
      Returns:
      EastAsianYear
      Throws:
      IllegalArgumentException - if the year is smaller than 1
      See Also:
      KoreanEra
    • forJuche

      static EastAsianYear forJuche(int jucheYear)

      Determines the East Asian year corresponding to given Juche year which starts counting in gregorian year 1912 or later.

      Used in North Korea.

      Parameters:
      jucheYear - the Juche year which contains the first day of East Asian year
      Returns:
      EastAsianYear
      Throws:
      IllegalArgumentException - if the year is smaller than 1
      See Also:
      KoreanEra
    • getCycle

      default int getCycle()

      Determines the number of associated sexagesimal year cycle.

      Returns:
      number of cycle
    • getYearOfCycle

      default CyclicYear getYearOfCycle()

      Determines the cyclic year.

      Returns:
      cyclic year
    • getElapsedCyclicYears

      int getElapsedCyclicYears()
      Marks the traditional introduction date of sexagesimal cyclic years in Julian year 2637 BCE by the legendary yellow emperor Huang-di.
      Returns:
      count of sexagesimal cyclic years since Julian year 2637 BCE