1
0
mirror of synced 2026-02-04 12:07:59 +08:00
2020-04-05 11:07:54 +08:00
2020-04-05 11:07:54 +08:00
2018-06-23 16:41:40 +08:00
2018-06-23 16:41:40 +08:00
2018-06-23 16:41:40 +08:00
2020-04-05 11:07:54 +08:00

lunar License

lunar is a calendar library for Solar and Chinese Lunar.

Support since java 1.5

简体中文

Release

<dependency>
  <groupId>cn.6tail</groupId>
  <artifactId>lunar</artifactId>
  <version>1.0.0</version>
</dependency>

Snapshot

<repository>
  <id>sonatype</id>
  <url>https://oss.sonatype.org/content/groups/public/</url>
  <snapshots>
    <enabled>true</enabled>
    <updatePolicy>daily</updatePolicy>
    <checksumPolicy>warn</checksumPolicy>
  </snapshots>
</repository>
<dependency>
  <groupId>cn.6tail</groupId>
  <artifactId>lunar</artifactId>
  <version>1.0.0-SNAPSHOT</version>
</dependency>

Download

If you will use jars in your projects, I suggest you to download latest snapshot versions with less bugs.

Download

Example

import com.nlf.calendar.Lunar;
 
/**
 * 阴历示例
 *
 */
public class LunarSample{
  public static void main(String[] args){
    //今天
    Lunar date = new Lunar();
    //输出阴历信息
    System.out.println(date.toFullString());
    //输出阳历信息
    System.out.println(date.getSolar().toFullString());
    System.out.println();
    //指定阴历的某一天
    date = new Lunar(1986,4,21);
    System.out.println(date.toFullString());
    System.out.println(date.getSolar().toFullString());
  }
}

Output:

贰零壹陆年捌月初八 丙申(猴)年丁酉月癸巳日 北方玄武 斗木獬 彭祖百忌[癸不词讼理弱敌强 巳不远行财物伏藏] 喜神方位[巽](东南) 阳贵神方位[巽](东南) 阴贵神方位[震](正东) 福神方位[兑](正西) 财神方位[离](正南) 冲[(丁亥)猪] 刹[东]
2016-09-08 闰年 星期四 (世界扫盲日) 处女座
 
壹玖捌陆年肆月廿一 丙寅(虎)年癸巳月癸酉日 北方玄武 危月燕 彭祖百忌[癸不词讼理弱敌强 酉不会客醉坐颠狂] 喜神方位[巽](东南) 阳贵神方位[巽](东南) 阴贵神方位[震](正东) 福神方位[兑](正西) 财神方位[离](正南) 冲[(丁卯)兔] 刹[东]
1986-05-29 星期四 双子座

Documentation

Please visit http://6tail.cn/calendar/api.html

Contact

lunar

Description
日历、公历(阳历)、农历(阴历、老黄历)、佛历、道历,节假日、星座、儒略日、干支、生肖、节气、节日、彭祖百忌、每日宜忌、吉神宜趋凶煞宜忌、吉神(喜神/福神/财神/阳贵神/阴贵神)方位、胎神方位、冲煞、纳音、星宿、八字、五行、十神、建除十二值星、青龙名堂等十二神、黄道日及吉凶等。lunar is a calendar library for Solar and Chinese Lunar.
http://6tail.cn/calendar/api.html
Readme MIT 2.2 MiB
Languages
Java 100%