1
0
mirror of synced 2026-10-14 10:36:22 +08:00

v1.2.14 佛历新增27宿;修复宜忌重复的问题;修复获取气时缺冬至的问题。

This commit is contained in:
6tail
2021-12-08 21:45:12 +08:00
parent bab052909b
commit e9ec0fc4b9
9 changed files with 174 additions and 7 deletions

View File

@@ -18,4 +18,14 @@ public class FotoTest {
Assert.assertEquals("二五六五年十月十四 (三元降) (四天王巡行)", foto.toFullString());
}
@Test
public void test1() {
Foto foto = Foto.fromLunar(Lunar.fromYmd(2020, 4, 13));
Assert.assertEquals("氐", foto.getXiu());
Assert.assertEquals("土", foto.getZheng());
Assert.assertEquals("貉", foto.getAnimal());
Assert.assertEquals("东", foto.getGong());
Assert.assertEquals("青龙", foto.getShou());
}
}

View File

@@ -186,4 +186,12 @@ public class JieQiTest {
Assert.assertEquals("2050-12-07 06:41:00", lunar.getJieQiTable().get("大雪").toYmdHms());
}
@Test
public void test9() {
Solar solar = Solar.fromYmd(2021, 12, 21);
Assert.assertEquals("冬至", solar.getLunar().getJieQi());
Assert.assertEquals("", solar.getLunar().getJie());
Assert.assertEquals("冬至", solar.getLunar().getQi());
}
}

View File

@@ -387,4 +387,11 @@ public class LunarTest {
Assert.assertEquals("厕灶厨 外西南", lunar.getDayPositionTai());
}
@Test
public void test53() {
Solar solar = Solar.fromYmd(2021, 11, 27);
Lunar lunar = solar.getLunar();
Assert.assertEquals("[嫁娶, 祭祀, 祈福, 求嗣, 开光, 出行, 解除, 出火, 拆卸, 进人口, 入宅, 移徙, 安床, 栽种, 动土, 修造, 纳畜, 入殓, 安葬, 立碑, 除服, 成服]", lunar.getDayYi().toString());
}
}