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 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; } }