Initial commit
This commit is contained in:
26
src/test/java/sample/SolarTest.java
Normal file
26
src/test/java/sample/SolarTest.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package sample;
|
||||
|
||||
import com.nlf.calendar.Solar;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* 阳历示例
|
||||
*/
|
||||
public class SolarTest {
|
||||
|
||||
@Test
|
||||
public void test(){
|
||||
//阳历今天
|
||||
Solar date = new Solar();
|
||||
//输出阳历信息
|
||||
System.out.println(date.toFullString());
|
||||
//输出阴历信息
|
||||
System.out.println(date.getLunar().toFullString());
|
||||
System.out.println();
|
||||
//指定某个阳历日期
|
||||
date = new Solar(1986,5,29);
|
||||
System.out.println(date.toFullString());
|
||||
System.out.println(date.getLunar().toFullString());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user