Lunar is a dependency free calendar tool library that supports the solar and lunar calendar. It is available in js, java, c#, php, python, go, typescript, flutter, and is independent of third parties. Currently supports the Gregorian calendar and lunar calendar, constellations, dry branches, Chinese zodiac, solar terms, festivals, Pengzu hundred taboo, daily taboo, auspicious gods, auspicious gods, evil spirits, auspicious gods, Chong Sha, Na Yin, stars, eight characters, five elements, ten gods, building in addition to twelve stars, twelve gods such as Green Dragon Hall, Zodiacal day and auspicious and ominous.

Quick Start (Java version) :
Depend on
// maven<dependency><groupId>cn.6tail</groupId><artifactId>lunar</artifactId><version>1.2.5</version></dependency>
// gradleimplementation 'com.github.6tail:lunar-java:v1.2.5'
- Sample code
Solar calenda
// Year Month daySolar d = Solar.fromYmd(2016, 1, 1);System.out.println(d);// Year, month, day, minute and secondd = Solar.fromYmdHms(2016, 1, 1, 20, 35, 0);System.out.println(d);// Date d = Solar.fromDate(new Date());System.out.println(d.toFullString());// = Solar.fromJulianDay(2458960.5);System.out.println(d.toFullString());// l = Solar.fromBaZi("庚子", Xinsi, Gengwu, Bingzi);for (Solar solar : l) {System.out.println(solar.toFullString());}
output

horoscope
//horoscopeLunar lunar = Lunar.fromDate(new Date());EightChar d = lunar.getEightChar();System.out.println(d);System.out.println(d.getYearWuXing() + ", " + d.getMonthWuXing() + ", " + d.getDayWuXing() + ", " + d.getTimeWuXing());System.out.println(d.getYearNaYin() + ", " + d.getMonthNaYin() + ", " + d.getDayNaYin() + ", " + d.getTimeNaYin());System.out.println(d.getYearShiShenGan() + ", " + d.getMonthShiShenGan() + ", " + d.getDayShiShenGan() + ", " + d.getTimeShiShenGan());//"Year Branch Ten Gods = "em.out.println("Year Branch Ten Gods = "//"日支十神 = " + d.getDayShiShenZhi());Hour Branch Ten GodsSystem.out.println( = d.getYun(">//Time Branch Ten Gods// 获取男运Yun yun ="Year"getYun(1);//"Year"-string">Get the DaYun table DaYun[] daYunArr = yun.get"months"n(); class="hljs-string">"年" + yun.getStartMo"days after fortune starts"+ Goddess Ascending Fortune);// 获取大运表DaYun[]"DaYun["nArr = yun.getDaYun();for (int i=<"Year " class="hljs-number">0, j=daYunArr.length; i<"Age "++) {+ daYun.getGanZhi());}// Theystem.out.println(DaYun LiuNian[] LiuNianArr = daYunArr[span class="hljs-string">"岁 " + daYun.getGanZhi());}// 第1次大运流年LiuNian[] LiuNianArr = daYunArr[1].getLiuNian();for (int"Year "an> i=0, j=LiuNianA"Age "ength; i<j; i++) {LiuNian liuNian = LiuNianArr[i];System.out.p"year "ln(Time flies[ + i + "] = " + liuNian.getYear() + year + liuNian.getAge() + years old + liuNian.getGanZhi());}
output

Other examples:
Calendar
Calendar
Tung Shing

Tung Shing You can read more on your own.
