1
0
mirror of synced 2026-10-14 18:46:13 +08:00

v1.3.2 修复阳历推移错误的问题。

This commit is contained in:
6tail
2023-02-20 21:16:33 +08:00
parent 8fb86c0887
commit 60dde2c619
5 changed files with 69 additions and 29 deletions

View File

@@ -1,5 +1,6 @@
package test;
import com.nlf.calendar.Lunar;
import com.nlf.calendar.Solar;
import com.nlf.calendar.util.SolarUtil;
import org.junit.Assert;
@@ -145,4 +146,29 @@ public class SolarTest {
Assert.assertEquals(355, days);
}
@Test
public void test23(){
Solar solar = Solar.fromYmd(1991, 5, 12);
Lunar lunar = solar.getLunar();
Assert.assertEquals("壬午", lunar.getDayInGanZhi());
}
@Test
public void test24(){
Solar solar = new Solar(1582, 10, 15);
Assert.assertEquals("1582-09-30", solar.next(-5).toYmd());
}
@Test
public void test25(){
Solar solar = new Solar(1582, 10, 15);
Assert.assertEquals("1582-10-04", solar.next(-1).toYmd());
}
@Test
public void test26(){
Solar solar = new Solar(1582, 10, 15);
Assert.assertEquals("1582-09-29", solar.next(-6).toYmd());
}
}