Test.java
1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import com.chinagas.common.core.utils.date.SolarTermsUtils;
import java.util.Calendar;
import java.util.concurrent.*;
/**
* @ClassName Test
* @Author lidengwei
* @Description TODO
* @CreateTime 2022/10/13 16:43
*/
public class Test {
public static void main(String[] args) throws InterruptedException, ExecutionException {
// TestThread t1 = new TestThread();
// Thread t2 = new Thread(new TestRunnable());
// TestTask task = new TestTask();
// ExecutorService executorService = Executors.newCachedThreadPool();
// t1.start();
// t2.start();
// Future<Integer> result = executorService.submit(task);
// boolean r = result.cancel(true);
// System.out.println(r);
// System.out.println(BT.one.equals(BT.one));
Calendar cal = Calendar.getInstance();
System.out.println(cal.getTime());
cal.set(2022,9,4);
SolarTermsUtils solarTerms = new SolarTermsUtils(cal.getTime());
System.out.println("是否阳历节日:"+solarTerms.isSFestival()+solarTerms.getSFestivalName());
System.out.println("是否阴历节日:"+solarTerms.isLFestival()+solarTerms.getLFestivalName());
System.out.println("日期:"+solarTerms.getLunarMonthString()+"月"+solarTerms.getLunarDayString());
System.out.println(solarTerms.getSolarMonth()+"月"+solarTerms.getSolarDay()+"日");
}
enum BT{
one,
two,
three;
}
}