v1.2.22 新增万圣节、万圣节前夜;新增全国中小学生安全教育日;新增春社(原二月初二春社改为社日节)、秋社;优化代码。
This commit is contained in:
@@ -15,17 +15,17 @@ public class LunarTime {
|
||||
/**
|
||||
* 天干下标,0-9
|
||||
*/
|
||||
private int ganIndex;
|
||||
private final int ganIndex;
|
||||
|
||||
/**
|
||||
* 地支下标,0-11
|
||||
*/
|
||||
private int zhiIndex;
|
||||
private final int zhiIndex;
|
||||
|
||||
/**
|
||||
* 阴历
|
||||
*/
|
||||
private Lunar lunar;
|
||||
private final Lunar lunar;
|
||||
|
||||
public LunarTime(int lunarYear, int lunarMonth, int lunarDay, int hour, int minute, int second) {
|
||||
this.lunar = Lunar.fromYmdHms(lunarYear, lunarMonth, lunarDay, hour, minute, second);
|
||||
@@ -316,10 +316,7 @@ public class LunarTime {
|
||||
//顺逆
|
||||
String solarYmd = lunar.getSolar().toYmd();
|
||||
Map<String, Solar> jieQi = lunar.getJieQiTable();
|
||||
boolean asc = false;
|
||||
if (solarYmd.compareTo(jieQi.get("冬至").toYmd()) >= 0 && solarYmd.compareTo(jieQi.get("夏至").toYmd()) < 0) {
|
||||
asc = true;
|
||||
}
|
||||
boolean asc = solarYmd.compareTo(jieQi.get("冬至").toYmd()) >= 0 && solarYmd.compareTo(jieQi.get("夏至").toYmd()) < 0;
|
||||
int start = asc ? 7 : 3;
|
||||
String dayZhi = lunar.getDayZhi();
|
||||
if ("子午卯酉".contains(dayZhi)) {
|
||||
|
||||
Reference in New Issue
Block a user