All Implemented Interfaces:
Almanac, Culture

public class LunarDay extends Loops
农历日
Since:
Java 17+
Author:
Kimi Liu
  • Field Details

    • NAMES

      public static final String[] NAMES
    • month

      protected LunarMonth month
      农历月
    • day

      protected int day
  • Constructor Details

    • LunarDay

      public LunarDay(int year, int month, int day)
      初始化
      Parameters:
      year - 农历年
      month - 农历月,闰月为负
      day - 农历日
  • Method Details

    • fromYmd

      public static LunarDay fromYmd(int year, int month, int day)
      从农历年月日初始化
      Parameters:
      year - 农历年
      month - 农历月,闰月为负
      day - 农历日
    • getLunarMonth

      public LunarMonth getLunarMonth()
      农历月
      Returns:
      农历月
    • getYear

      public int getYear()
      Returns:
    • getMonth

      public int getMonth()
      Returns:
    • getDay

      public int getDay()
      Returns:
    • getName

      public String getName()
      Description copied from interface: Almanac
      名称
      Returns:
      名称
    • toString

      public String toString()
      Overrides:
      toString in class Tradition
    • next

      public LunarDay next(int n)
      Description copied from interface: Culture
      推移
      Parameters:
      n - 推移步数
      Returns:
      this
    • isBefore

      public boolean isBefore(LunarDay target)
      是否在指定农历日之前
      Parameters:
      target - 农历日
      Returns:
      true/false
    • isAfter

      public boolean isAfter(LunarDay target)
      是否在指定农历日之后
      Parameters:
      target - 农历日
      Returns:
      true/false
    • getWeek

      public Week getWeek()
      星期
      Returns:
      星期
    • getYearSixtyCycle

      public SixtyCycle getYearSixtyCycle()
      当天的年干支(立春换)
      Returns:
      干支
    • getMonthSixtyCycle

      public SixtyCycle getMonthSixtyCycle()
      当天的月干支(节气换)
      Returns:
      干支
    • getSixtyCycle

      public SixtyCycle getSixtyCycle()
      干支
      Returns:
      干支
    • getDuty

      public Duty getDuty()
      建除十二值神
      Returns:
      建除十二值神
    • getTwelveStar

      public TwelveStar getTwelveStar()
      黄道黑道十二神
      Returns:
      黄道黑道十二神
    • getNineStar

      public NineStar getNineStar()
      九星
      Returns:
      九星
    • getJupiterDirection

      public Direction getJupiterDirection()
      太岁方位
      Returns:
      方位
    • getFetusDay

      public FetusDay getFetusDay()
      逐日胎神
      Returns:
      逐日胎神
    • getPhase

      public Phase getPhase()
      月相
      Returns:
      月相
    • getSixStar

      public SixStar getSixStar()
      六曜
      Returns:
      六曜
    • getSolarDay

      public SolarDay getSolarDay()
      公历日
      Returns:
      公历日
    • getTwentyEightStar

      public TwentyEightStar getTwentyEightStar()
      二十八宿
      Returns:
      二十八宿
    • getFestival

      public LunarFestival getFestival()
      农历传统节日,如果当天不是农历传统节日,返回null
      Returns:
      农历传统节日
    • getHours

      public List<LunarHour> getHours()
      当天的时辰列表
      Returns:
      时辰列表
    • getGods

      public List<God> getGods()
      神煞列表(吉神宜趋,凶神宜忌)
      Returns:
      神煞列表
    • getRecommends

      public List<Taboo> getRecommends()
      Returns:
      宜忌列表
    • getAvoids

      public List<Taboo> getAvoids()
      Returns:
      宜忌列表
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Tradition