This commit is contained in:
Looly 2022-02-23 00:37:33 +08:00
parent bb59f19d92
commit 0964424e74

View File

@ -75,7 +75,7 @@ public class GanZhi {
public static String getGanzhiOfDay(int year, int month, int day) {
// 与1970-01-01相差天数不包括当天
final long days = LocalDate.of(year, month, day).toEpochDay() - 1;
//1899-12-21是农历1899年腊月甲子日 40相差1900-01-31有40
return cyclicalm((int) (days - LunarInfo.BASE_DAY + 40));
//1899-12-21是农历1899年腊月甲子日 41相差1900-01-31有41
return cyclicalm((int) (days - LunarInfo.BASE_DAY + 41));
}
}