Enum Class SolarTerm

java.lang.Object
java.lang.Enum<SolarTerm>
net.time4j.calendar.SolarTerm
All Implemented Interfaces:
Serializable, Comparable<SolarTerm>, java.lang.constant.Constable

public enum SolarTerm extends Enum<SolarTerm>
The solar terms of Chinese calendar year which divide the sun eclipse into 24 parts.

See also Wikipedia.

Since:
3.40/4.35
Author:
Meno Hochschild
  • Enum Constant Details

    • MINOR_01_LICHUN_315

      public static final SolarTerm MINOR_01_LICHUN_315
      Solar longitude 315. Around February 4. Meaning: Beginning of Spring.
    • MAJOR_01_YUSHUI_330

      public static final SolarTerm MAJOR_01_YUSHUI_330
      Solar longitude 330. Around February 19. Meaning: Rain Water.
    • MINOR_02_JINGZHE_345

      public static final SolarTerm MINOR_02_JINGZHE_345
      Solar longitude 345. Around March 6. Meaning: Waking of Insects.
    • MAJOR_02_CHUNFEN_000

      public static final SolarTerm MAJOR_02_CHUNFEN_000
      Solar longitude 0. Around March 21. Meaning: Vernal Equinox.
    • MINOR_03_QINGMING_015

      public static final SolarTerm MINOR_03_QINGMING_015
      Solar longitude 15. Around April 5. Meaning: Pure Brightness.
    • MAJOR_03_GUYU_030

      public static final SolarTerm MAJOR_03_GUYU_030
      Solar longitude 30. Around April 20. Meaning: Grain Rain.
    • MINOR_04_LIXIA_045

      public static final SolarTerm MINOR_04_LIXIA_045
      Solar longitude 45. Around May 6. Meaning: Beginning of Summer.
    • MAJOR_04_XIAOMAN_060

      public static final SolarTerm MAJOR_04_XIAOMAN_060
      Solar longitude 60. Around May 21. Meaning: Grain Full.
    • MINOR_05_MANGZHONG_075

      public static final SolarTerm MINOR_05_MANGZHONG_075
      Solar longitude 75. Around June 6. Meaning: Grain in Ear.
    • MAJOR_05_XIAZHI_090

      public static final SolarTerm MAJOR_05_XIAZHI_090
      Solar longitude 90. Around June 21. Meaning: Summer Solstice.
    • MINOR_06_XIAOSHU_105

      public static final SolarTerm MINOR_06_XIAOSHU_105
      Solar longitude 105. Around July 7. Meaning: Slight Heat.
    • MAJOR_06_DASHU_120

      public static final SolarTerm MAJOR_06_DASHU_120
      Solar longitude 120. Around July 23. Meaning: Great Heat.
    • MINOR_07_LIQIU_135

      public static final SolarTerm MINOR_07_LIQIU_135
      Solar longitude 135. Around August 8. Meaning: Beginning of Autumn.
    • MAJOR_07_CHUSHU_150

      public static final SolarTerm MAJOR_07_CHUSHU_150
      Solar longitude 150. Around August 23. Meaning: Limit of Heat.
    • MINOR_08_BAILU_165

      public static final SolarTerm MINOR_08_BAILU_165
      Solar longitude 165. Around September 8. Meaning: White Dew.
    • MAJOR_08_QIUFEN_180

      public static final SolarTerm MAJOR_08_QIUFEN_180
      Solar longitude 180. Around September 23. Meaning: Autumnal Equinox.
    • MINOR_09_HANLU_195

      public static final SolarTerm MINOR_09_HANLU_195
      Solar longitude 195. Around October 8. Meaning: Cold Dew.
    • MAJOR_09_SHUANGJIANG_210

      public static final SolarTerm MAJOR_09_SHUANGJIANG_210
      Solar longitude 210. Around October 24. Meaning: Descent of Frost.
    • MINOR_10_LIDONG_225

      public static final SolarTerm MINOR_10_LIDONG_225
      Solar longitude 225. Around November 8. Meaning: Beginning of Winter.
    • MAJOR_10_XIAOXUE_240

      public static final SolarTerm MAJOR_10_XIAOXUE_240
      Solar longitude 240. Around November 22. Meaning: Slight Snow.
    • MINOR_11_DAXUE_255

      public static final SolarTerm MINOR_11_DAXUE_255
      Solar longitude 255. Around December 7. Meaning: Great Snow.
    • MAJOR_11_DONGZHI_270

      public static final SolarTerm MAJOR_11_DONGZHI_270
      Solar longitude 270. Around December 22. Meaning: Winter Solstice.
    • MINOR_12_XIAOHAN_285

      public static final SolarTerm MINOR_12_XIAOHAN_285
      Solar longitude 285. Around January 6. Meaning: Slight Cold.
    • MAJOR_12_DAHAN_300

      public static final SolarTerm MAJOR_12_DAHAN_300
      Solar longitude 300. Around January 20. Meaning: Great Cold.
  • Method Details

    • values

      public static SolarTerm[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SolarTerm valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • ofMajor

      public static SolarTerm ofMajor(int index)

      Obtains a major SolarTerm by given index according to the traditional order in the Chinese calendar.

      Parameters:
      index - an integer in range 1-12
      Returns:
      SolarTerm
      Throws:
      IllegalArgumentException - if the index is out of range
    • ofMinor

      public static SolarTerm ofMinor(int index)

      Obtains a minor SolarTerm by given index according to the traditional order in the Chinese calendar.

      Parameters:
      index - an integer in range 1-12
      Returns:
      SolarTerm
      Throws:
      IllegalArgumentException - if the index is out of range
    • of

      public static SolarTerm of(Moment moment)

      Obtains an instance of SolarTerm at given moment.

      Parameters:
      moment - the moment for which the solar term needs to be searched
      Returns:
      SolarTerm
      Throws:
      IllegalArgumentException - if the Julian day of moment is not in supported range
      See Also:
      JulianDay.MIN, JulianDay.MAX
    • getIndex

      public int getIndex()

      Obtains the associated index according to the traditional order in the Chinese calendar.

      The index itself is not unique because a solar term must be qualified by the major/minor-property, too.

      Returns:
      int (in range 1-12)
      See Also:
      isMajor(), isMinor()
    • isMajor

      public boolean isMajor()

      Does this instance represent a principal (major) solar term in multiples of 30 degrees?

      Returns:
      boolean
      See Also:
      isMinor()
    • isMinor

      public boolean isMinor()

      Does this instance represent a minor solar term?

      Returns:
      boolean
      See Also:
      isMajor()
    • getSolarLongitude

      public int getSolarLongitude()

      Obtains the associated solar longitude in degrees.

      Returns:
      angle in degrees (range 0 <= angle < 360)
    • roll

      public SolarTerm roll(int amount)

      Rolls this instance by given amount of solar terms.

      Parameters:
      amount - count of solar terms (maybe negative)
      Returns:
      result of rolling operation
    • onOrAfter

      public <D extends EastAsianCalendar<?,​ D>> D onOrAfter(D date)

      Determines the date when this solar term will happen on or after given date.

      Type Parameters:
      D - type of the East Asian chronology to be applied
      Parameters:
      date - the starting date of the search for this solar term
      Returns:
      resulting date when this solar term will happen first
    • list

      public static <D extends EastAsianCalendar<?,​ D>> List<D> list(int gregorianYear, Chronology<D> chronology)

      Obtains a list of dates of all solar terms beginning with Lichun in spring of given gregorian year.

      Note: The returned list of solar terms might cover different calendar years because the solar cycle is generally different from the lunar calendar cycle.

      Type Parameters:
      D - type of the East Asian chronology to be applied
      Parameters:
      gregorianYear - the gregorian year in which the first solar term Lichun occurs
      chronology - chronology for generating the calendar dates of the list
      Returns:
      list of calendar dates of all solar terms starting with Lichun in spring of given gregorian year
      Since:
      5.8
      See Also:
      MINOR_01_LICHUN_315, onOrAfter(D)
    • sinceLichun

      public <D extends EastAsianCalendar<?,​ D>> ChronoOperator<D> sinceLichun()

      Obtains an operator which searches for this solar term on or after Lichun event in the gregorian year corresponding to the East Asian calendar date in question.

      Example:

           ChineseCalendar chineseNewYear = ChineseCalendar.ofNewYear(2021); // 2021-02-12
           assertThat(
                chineseNewYear.with(SolarTerm.MINOR_01_LICHUN_315.sinceLichun()).transform(PlainDate.class),
                is(PlainDate.of(2021, 2, 3)));
       
      Type Parameters:
      D - type of the East Asian chronology to be applied
      Returns:
      ChronoOperator applicable on all dates of given chronological type
      Since:
      5.8
      See Also:
      sinceNewYear()
    • sinceNewYear

      public <D extends EastAsianCalendar<?,​ D>> ChronoOperator<D> sinceNewYear()

      Obtains an operator which searches for this solar term on or after New Year of the East Asian calendar date in question.

      Example:

           ChineseCalendar chineseNewYear = ChineseCalendar.ofNewYear(2021); // 2021-02-12
           assertThat(
                chineseNewYear.with(SolarTerm.MINOR_01_LICHUN_315.sinceNewYear()).transform(PlainDate.class),
                is(PlainDate.of(2022, 2, 4)));
       

      This operator is related to East Asian calendar years and not to the usually different solar term cycles starting at Lichun. Some East Asian calendar years might contain the given solar term even twice or not at all. In first case (if the given solar term occurs twice in corresponding East Asian calendar year), the operator will determine the first and not the second occurence of solar term. If the East Asian calendar year does not contain given solar term then the operator will yield the solar term of next calendar year (see code example above).

      Type Parameters:
      D - type of the East Asian chronology to be applied
      Returns:
      ChronoOperator applicable on all dates of given chronological type
      Since:
      5.8
      See Also:
      sinceLichun()
    • getDisplayName

      public String getDisplayName(Locale locale)

      Gets the description text dependent on the locale.

      Parameters:
      locale - language setting
      Returns:
      descriptive text (long form, never null)
    • parse

      public static SolarTerm parse(CharSequence text, Locale locale) throws ParseException

      Tries to interprete given text as solar term.

      Parameters:
      text - the text to be parsed
      locale - language setting
      Returns:
      the parsed solar term if successful
      Throws:
      ParseException - if parsing fails