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

新增八字转阳历;新增中国人民警察节。

This commit is contained in:
6tail
2020-07-22 16:04:02 +08:00
parent 4f57631f74
commit 8d282f8a7c
3 changed files with 102 additions and 2 deletions

View File

@@ -2,9 +2,10 @@ package sample;
import com.nlf.calendar.Lunar;
import com.nlf.calendar.Solar;
import org.junit.Assert;
import org.junit.Test;
import java.util.List;
/**
* 八字测试
*/
@@ -58,6 +59,15 @@ public class BaZiTest {
System.out.println(lunar.getBaZi());
}
@Test
public void testBazi2Solar6() {
List<Solar> l = Solar.fromBaZi("庚子", "戊寅", "戊寅", "癸亥");
// [2020-02-05 22:00:00, 1960-02-20 22:00:00]
for (Solar solar : l) {
System.out.println(solar.toFullString());
}
}
@Test
public void test7(){
Solar solar = new Solar(2020,5,26,23,43,0);
@@ -66,4 +76,22 @@ public class BaZiTest {
System.out.println(lunar.getBaZi());
}
@Test
public void testBazi2Solar7() {
List<Solar> l = Solar.fromBaZi("庚子", "辛巳", "庚午", "丙子");
// [2020-07-21 22:00:00, 1960-08-05 22:00:00]
for (Solar solar : l) {
System.out.println(solar.toFullString());
}
}
@Test
public void testBazi2Solar() {
List<Solar> l = Solar.fromBaZi("庚子", "癸未", "乙丑", "丁亥");
// [2020-05-26 23:00:00, 2020-05-27 00:00:00]
for (Solar solar : l) {
System.out.println(solar.toFullString());
}
}
}