Class CalendaristConvert

java.lang.Object
com.luna.common.calendarist.core.convert.CalendaristConvert

public class CalendaristConvert extends Object
转换工具类 参考: https://blog.csdn.net/FengRenYuanDeFZ/article/details/100162807 https://zhuanlan.zhihu.com/p/57261062 https://github.com/CutePandaSh/zhdate/blob/master/zhdate/__init__.py https://github.com/isee15/Lunar-Solar-Calendar-Converter/blob/master/Java/cn/z/LunarSolarConverter.java https://blog.csdn.net/qq784515681/article/details/80861706#commentsedit https://www.cnblogs.com/doubleWin/p/10690127.html
  • Constructor Details

    • CalendaristConvert

      public CalendaristConvert()
  • Method Details

    • toLunar

      public static LunarDate toLunar(long timeMillis)
      阳历时间戳转农历时间
      Parameters:
      timeMillis - 阳历时间戳
      Returns:
      LunarDate
    • toSolar

      public static SolarDate toSolar(LunarDate lunarDate)
      农历日期转阳历日期
      Parameters:
      lunarDate - 农历日期 LunarDate
      Returns:
      SolarDate
    • toCycle

      public static CycleDate toCycle(LunarDate lunarDate)
      农历时间转干支时间
      Parameters:
      lunarDate - 农历时间
      Returns:
      CycleDate
    • toCycle

      public static CycleDate toCycle(SolarDate solarDate)
      阳历日期转干支日期
      Parameters:
      solarDate - 阳历日期
      Returns:
      CycleDate