1
0
mirror of synced 2026-10-15 02:56:11 +08:00

v1.2.13 新增道历Tao。

This commit is contained in:
6tail
2021-11-25 22:26:49 +08:00
parent 868aaac231
commit bab052909b
11 changed files with 438 additions and 9 deletions

View File

@@ -15,7 +15,7 @@ public class FotoTest {
@Test
public void test() {
Foto foto = Foto.fromLunar(Lunar.fromYmd(2021, 10, 14));
Assert.assertEquals("二五六五年十月十四 (三元降 犯者减寿) (四天王巡行)", foto.toFullString());
Assert.assertEquals("二五六五年十月十四 (三元降) (四天王巡行)", foto.toFullString());
}
}

View File

@@ -0,0 +1,31 @@
package test;
import com.nlf.calendar.Lunar;
import com.nlf.calendar.Tao;
import org.junit.Assert;
import org.junit.Test;
/**
* 道历测试
*
* @author 6tail
*/
public class TaoTest {
@Test
public void test() {
Tao tao = Tao.fromLunar(Lunar.fromYmdHms(2021, 10, 17, 18, 0, 0));
Assert.assertEquals("四七一八年十月十七", tao.toString());
Assert.assertEquals("道歷四七一八年,天運辛丑年,己亥月,癸酉日。十月十七日,酉時。", tao.toFullString());
}
@Test
public void test1() {
Tao tao = Tao.fromYmd(4718, 10, 18);
Assert.assertEquals("[地母娘娘圣诞, 四时会]", tao.getFestivals().toString());
tao = Lunar.fromYmd(2021, 10, 18).getTao();
Assert.assertEquals("[地母娘娘圣诞, 四时会]", tao.getFestivals().toString());
}
}