1
0
mirror of synced 2026-10-08 16:04:11 +08:00

Compare commits

...

4 Commits

14 changed files with 644 additions and 172 deletions

View File

@@ -10,35 +10,13 @@ lunar是一款无第三方依赖的公历(阳历)和农历(阴历、老黄历)
[English](https://github.com/6tail/lunar-java/blob/master/README_EN.md)
### 正式版本
### Maven
```xml
<dependency>
<groupId>cn.6tail</groupId>
<artifactId>lunar</artifactId>
<version>1.2.6</version>
</dependency>
```
### 快照版本
```xml
<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>
```
```xml
<dependency>
<groupId>cn.6tail</groupId>
<artifactId>lunar</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.10</version>
</dependency>
```

View File

@@ -6,35 +6,13 @@ lunar is a calendar library for Solar and Chinese Lunar.
[简体中文](https://github.com/6tail/lunar-java/blob/master/README.md)
### Release
### Maven
```xml
<dependency>
<groupId>cn.6tail</groupId>
<artifactId>lunar</artifactId>
<version>1.2.6</version>
</dependency>
```
### Snapshot
```xml
<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>
```
```xml
<dependency>
<groupId>cn.6tail</groupId>
<artifactId>lunar</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.10</version>
</dependency>
```

View File

@@ -7,7 +7,7 @@
<groupId>cn.6tail</groupId>
<artifactId>lunar</artifactId>
<packaging>jar</packaging>
<version>1.2.6</version>
<version>1.2.10</version>
<name>${project.groupId}:${project.artifactId}</name>
<url>https://github.com/6tail/lunar-java</url>
<description>a calendar library for Solar and Chinese Lunar</description>

View File

@@ -0,0 +1,147 @@
package com.nlf.calendar;
import com.nlf.calendar.util.FotoUtil;
import com.nlf.calendar.util.LunarUtil;
import java.util.ArrayList;
import java.util.List;
/**
* 佛历
*
* @author 6tail
*/
public class Foto {
public static final int DEAD_YEAR = -543;
/**
* 阴历
*/
private Lunar lunar;
public Foto(Lunar lunar) {
this.lunar = lunar;
}
public static Foto fromLunar(Lunar lunar) {
return new Foto(lunar);
}
public static Foto fromYmdHms(int lunarYear, int lunarMonth, int lunarDay, int hour, int minute, int second) {
return Foto.fromLunar(Lunar.fromYmdHms(lunarYear + DEAD_YEAR - 1, lunarMonth, lunarDay, hour, minute, second));
}
public static Foto fromYmd(int lunarYear, int lunarMonth, int lunarDay) {
return fromYmdHms(lunarYear, lunarMonth, lunarDay, 0, 0, 0);
}
public Lunar getLunar() {
return lunar;
}
public int getYear() {
int sy = lunar.getSolar().getYear();
int y = sy - DEAD_YEAR;
if (sy == lunar.getYear()) {
y++;
}
return y;
}
public int getMonth() {
return lunar.getMonth();
}
public int getDay() {
return lunar.getDay();
}
public String getYearInChinese() {
String y = getYear() + "";
StringBuilder s = new StringBuilder();
for (int i = 0, j = y.length(); i < j; i++) {
s.append(LunarUtil.NUMBER[y.charAt(i) - '0']);
}
return s.toString();
}
public String getMonthInChinese() {
return lunar.getMonthInChinese();
}
public String getDayInChinese() {
return lunar.getDayInChinese();
}
public List<FotoFestival> getFestivals() {
List<FotoFestival> l = new ArrayList<FotoFestival>();
List<FotoFestival> fs = FotoUtil.FESTIVAL.get(getMonth() + "-" + getDay());
if (null != fs) {
l.addAll(fs);
}
return l;
}
public boolean isMonthZhai() {
int m = getMonth();
return 1 == m || 5 == m || 9 == m;
}
public boolean isDayYangGong() {
for (FotoFestival f : getFestivals()) {
if ("杨公忌".equals(f.getName())) {
return true;
}
}
return false;
}
public boolean isDayZhaiShuoWang() {
int d = getDay();
return 1 == d || 15 == d;
}
public boolean isDayZhaiSix() {
int d = getDay();
if (8 == d || 14 == d || 15 == d || 23 == d || 29 == d || 30 == d) {
return true;
} else if (28 == d) {
LunarMonth m = LunarMonth.fromYm(lunar.getYear(), getMonth());
return null != m && 30 != m.getDayCount();
}
return false;
}
public boolean isDayZhaiTen() {
int d = getDay();
return 1 == d || 8 == d || 14 == d || 15 == d || 18 == d || 23 == d || 24 == d || 28 == d || 29 == d || 30 == d;
}
public boolean isDayZhaiGuanYin() {
String k = getMonth() + "-" + getDay();
for (String d : FotoUtil.DAY_ZHAI_GUAN_YIN) {
if (k.equals(d)) {
return true;
}
}
return false;
}
@Override
public String toString() {
return getYearInChinese() + "年" + getMonthInChinese() + "月" + getDayInChinese();
}
public String toFullString() {
StringBuilder s = new StringBuilder();
s.append(toString());
for (FotoFestival f : getFestivals()) {
s.append(" (");
s.append(f);
s.append(")");
}
return s.toString();
}
}

View File

@@ -0,0 +1,79 @@
package com.nlf.calendar;
/**
* 佛历因果犯忌
*
* @author 6tail
*/
public class FotoFestival {
/**
* 是日何日,如:雷斋日
*/
private String name;
/**
* 犯之因果,如:犯者夺纪
*/
private String result;
/**
* 是否每月同
*/
private boolean everyMonth;
/**
* 备注,如:宜先一日即戒
*/
private String remark;
public FotoFestival(String name, String result, boolean everyMonth, String remark) {
this.name = name;
this.result = null == result ? "" : result;
this.everyMonth = everyMonth;
this.remark = null == remark ? "" : remark;
}
public FotoFestival(String name) {
this(name, null);
}
public FotoFestival(String name, String result) {
this(name, result, false);
}
public FotoFestival(String name, String result, boolean everyMonth) {
this(name, result, everyMonth, null);
}
public String getName() {
return name;
}
public String getResult() {
return result;
}
public boolean isEveryMonth() {
return everyMonth;
}
public String getRemark() {
return remark;
}
@Override
public String toString() {
StringBuilder s = new StringBuilder();
s.append(name);
if (null != result && result.length() > 0) {
s.append(" ");
s.append(result);
}
if (null != remark && remark.length() > 0) {
s.append(" ");
s.append(remark);
}
return s.toString();
}
}

View File

@@ -753,7 +753,7 @@ public class Lunar {
* @return 中文年,如二零零一
*/
public String getYearInChinese() {
String y = (year + "");
String y = year + "";
StringBuilder s = new StringBuilder();
for (int i = 0, j = y.length(); i < j; i++) {
s.append(LunarUtil.NUMBER[y.charAt(i) - '0']);
@@ -980,6 +980,9 @@ public class Lunar {
if (null != fs) {
l.addAll(fs);
}
if(solar.toYmd().equals(jieQi.get("清明").next(-1).toYmd())) {
l.add("寒食节");
}
return l;
}
@@ -1156,12 +1159,22 @@ public class Lunar {
}
/**
* 获取日福神方位
* 获取日福神方位(默认流派:2)
*
* @return 福神方位,如艮
*/
public String getDayPositionFu() {
return LunarUtil.POSITION_FU[dayGanIndex + 1];
return getDayPositionFu(2);
}
/**
* 获取日福神方位
*
* @param sect 流派,1或2
* @return 福神方位,如艮
*/
public String getDayPositionFu(int sect) {
return (1==sect?LunarUtil.POSITION_FU:LunarUtil.POSITION_FU_2)[dayGanIndex + 1];
}
/**
@@ -1246,12 +1259,22 @@ public class Lunar {
}
/**
* 获取时辰福神方位
* 获取时辰福神方位,默认流派2
*
* @return 福神方位,如艮
*/
public String getTimePositionFu() {
return LunarUtil.POSITION_FU[timeGanIndex + 1];
return getTimePositionFu(2);
}
/**
* 获取时辰福神方位
*
* @param sect 流派,1或2
* @return 福神方位,如艮
*/
public String getTimePositionFu(int sect) {
return (1==sect?LunarUtil.POSITION_FU:LunarUtil.POSITION_FU_2)[timeGanIndex + 1];
}
/**
@@ -1589,11 +1612,7 @@ public class Lunar {
* @return 逐日胎神方位
*/
public String getDayPositionTai() {
int offset = dayGanIndex - dayZhiIndex;
if (offset < 0) {
offset += 12;
}
return LunarUtil.POSITION_TAI_DAY[offset * 5 + dayGanIndex];
return LunarUtil.POSITION_TAI_DAY[LunarUtil.getJiaZiIndex(getDayInGanZhi())];
}
/**
@@ -2642,4 +2661,13 @@ public class Lunar {
return l;
}
/**
* 获取佛历
*
* @return 佛历
*/
public Foto getFoto() {
return Foto.fromLunar(this);
}
}

View File

@@ -156,6 +156,14 @@ public class Solar {
f -= minute;
f *= 60;
int second = (int) Math.round(f);
if (second > 59) {
second -= 60;
minute++;
}
if (minute > 59) {
minute -= 60;
hour++;
}
calendar = ExactDate.fromYmdHms(year, month, day, hour, minute, second);
this.year = year;

View File

@@ -0,0 +1,264 @@
package com.nlf.calendar.util;
import com.nlf.calendar.FotoFestival;
import java.util.*;
/**
* 佛历工具
*
* @author 6tail
*/
public class FotoUtil {
/**
* 观音斋日期
*/
public static final String[] DAY_ZHAI_GUAN_YIN = {"1-8", "2-7", "2-9", "2-19", "3-3", "3-6", "3-13", "4-22", "5-3", "5-17", "6-16", "6-18", "6-19", "6-23", "7-13", "8-16", "9-19", "9-23", "10-2", "11-19", "11-24", "12-25"};
private static final String DJ = "犯者夺纪";
private static final String JS = "犯者减寿";
private static final String SS = "犯者损寿";
private static final String XL = "犯者削禄夺纪";
private static final String JW = "犯者三年内夫妇俱亡";
private static final FotoFestival Y = new FotoFestival("杨公忌");
private static final FotoFestival T = new FotoFestival("四天王巡行", "", true);
private static final FotoFestival D = new FotoFestival("斗降", DJ, true);
private static final FotoFestival S = new FotoFestival("月朔", DJ, true);
private static final FotoFestival W = new FotoFestival("月望", DJ, true);
private static final FotoFestival H = new FotoFestival("月晦", JS, true);
private static final FotoFestival L = new FotoFestival("雷斋日", JS, true);
private static final FotoFestival J = new FotoFestival("九毒日", "犯者夭亡,奇祸不测");
private static final FotoFestival R = new FotoFestival("人神在阴", "犯者得病", true, "宜先一日即戒");
private static final FotoFestival M = new FotoFestival("司命奏事", JS, true, "如月小,即戒廿九");
private static final FotoFestival HH = new FotoFestival("月晦", JS, true, "如月小,即戒廿九");
/**
* 因果犯忌
*/
public static final Map<String, List<FotoFestival>> FESTIVAL = new HashMap<String, List<FotoFestival>>() {
private static final long serialVersionUID = 1L;
{
put("1-1", Arrays.asList(new FotoFestival("天腊,玉帝校世人神气禄命", XL), S));
put("1-3", Arrays.asList(new FotoFestival("万神都会", DJ), D));
put("1-5", Collections.nCopies(1, new FotoFestival("五虚忌")));
put("1-6", Arrays.asList(new FotoFestival("六耗忌"), L));
put("1-7", Collections.nCopies(1, new FotoFestival("上会日", SS)));
put("1-8", Arrays.asList(new FotoFestival("五殿阎罗天子诞", DJ), T));
put("1-9", Collections.nCopies(1, new FotoFestival("玉皇上帝诞", DJ)));
put("1-13", Collections.nCopies(1, Y));
put("1-14", Arrays.asList(new FotoFestival("三元降", JS), T));
put("1-15", Arrays.asList(new FotoFestival("三元降", JS), new FotoFestival("上元神会", DJ), W, T));
put("1-16", Collections.nCopies(1, new FotoFestival("三元降", JS)));
put("1-19", Collections.nCopies(1, new FotoFestival("长春真人诞")));
put("1-23", Arrays.asList(new FotoFestival("三尸神奏事"), T));
put("1-25", Arrays.asList(H, new FotoFestival("天地仓开日", "犯者损寿,子带疾")));
put("1-27", Collections.nCopies(1, D));
put("1-28", Collections.nCopies(1, R));
put("1-29", Collections.nCopies(1, T));
put("1-30", Arrays.asList(HH, M, T));
put("2-1", Arrays.asList(new FotoFestival("一殿秦广王诞", DJ), S));
put("2-2", Arrays.asList(new FotoFestival("万神都会", DJ), new FotoFestival("福德土地正神诞", "犯者得祸")));
put("2-3", Arrays.asList(new FotoFestival("文昌帝君诞", XL), D));
put("2-6", Arrays.asList(new FotoFestival("东华帝君诞"), L));
put("2-8", Arrays.asList(new FotoFestival("释迦牟尼佛出家", DJ), new FotoFestival("三殿宋帝王诞", DJ), new FotoFestival("张大帝诞", DJ), T));
put("2-11", Collections.nCopies(1, Y));
put("2-14", Collections.nCopies(1, T));
put("2-15", Arrays.asList(new FotoFestival("释迦牟尼佛涅槃", XL), new FotoFestival("太上老君诞", XL), new FotoFestival("月望", XL, true), T));
put("2-17", Collections.nCopies(1, new FotoFestival("东方杜将军诞")));
put("2-18", Arrays.asList(new FotoFestival("四殿五官王诞", XL), new FotoFestival("至圣先师孔子讳辰", XL)));
put("2-19", Collections.nCopies(1, new FotoFestival("观音大士诞", DJ)));
put("2-21", Collections.nCopies(1, new FotoFestival("普贤菩萨诞")));
put("2-23", Collections.nCopies(1, T));
put("2-25", Collections.nCopies(1, H));
put("2-27", Collections.nCopies(1, D));
put("2-28", Collections.nCopies(1, R));
put("2-29", Collections.nCopies(1, T));
put("2-30", Arrays.asList(HH, M, T));
put("3-1", Arrays.asList(new FotoFestival("二殿楚江王诞", DJ), S));
put("3-3", Arrays.asList(new FotoFestival("玄天上帝诞", DJ), D));
put("3-6", Collections.nCopies(1, L));
put("3-8", Arrays.asList(new FotoFestival("六殿卞城王诞", DJ), T));
put("3-9", Arrays.asList(new FotoFestival("牛鬼神出", "犯者产恶胎"), Y));
put("3-12", Collections.nCopies(1, new FotoFestival("中央五道诞")));
put("3-14", Collections.nCopies(1, T));
put("3-15", Arrays.asList(new FotoFestival("昊天上帝诞", DJ), new FotoFestival("玄坛诞", DJ), W, T));
put("3-16", Collections.nCopies(1, new FotoFestival("准提菩萨诞", DJ)));
put("3-19", Arrays.asList(new FotoFestival("中岳大帝诞"), new FotoFestival("后土娘娘诞"), new FotoFestival("三茅降")));
put("3-20", Arrays.asList(new FotoFestival("天地仓开日", SS), new FotoFestival("子孙娘娘诞")));
put("3-23", Collections.nCopies(1, T));
put("3-25", Collections.nCopies(1, H));
put("3-27", Arrays.asList(new FotoFestival("七殿泰山王诞"), D));
put("3-28", Arrays.asList(R, new FotoFestival("苍颉至圣先师诞", XL), new FotoFestival("东岳大帝诞")));
put("3-29", Collections.nCopies(1, T));
put("3-30", Arrays.asList(HH, M, T));
put("4-1", Arrays.asList(new FotoFestival("八殿都市王诞", DJ), S));
put("4-3", Collections.nCopies(1, D));
put("4-4", Arrays.asList(new FotoFestival("万神善会", "犯者失瘼夭胎"), new FotoFestival("文殊菩萨诞")));
put("4-6", Collections.nCopies(1, L));
put("4-7", Arrays.asList(new FotoFestival("南斗、北斗、西斗同降", JS), Y));
put("4-8", Arrays.asList(new FotoFestival("释迦牟尼佛诞", DJ), new FotoFestival("万神善会", "犯者失瘼夭胎"), new FotoFestival("善恶童子降", "犯者血死"), new FotoFestival("九殿平等王诞"), T));
put("4-14", Arrays.asList(new FotoFestival("纯阳祖师诞", JS), T));
put("4-15", Arrays.asList(W, new FotoFestival("钟离祖师诞"), T));
put("4-16", Collections.nCopies(1, new FotoFestival("天地仓开日", SS)));
put("4-17", Collections.nCopies(1, new FotoFestival("十殿转轮王诞", DJ)));
put("4-18", Arrays.asList(new FotoFestival("天地仓开日", SS), new FotoFestival("紫徽大帝诞", SS)));
put("4-20", Collections.nCopies(1, new FotoFestival("眼光圣母诞")));
put("4-23", Collections.nCopies(1, T));
put("4-25", Collections.nCopies(1, H));
put("4-27", Collections.nCopies(1, D));
put("4-28", Collections.nCopies(1, R));
put("4-29", Collections.nCopies(1, T));
put("4-30", Arrays.asList(HH, M, T));
put("5-1", Arrays.asList(new FotoFestival("南极长生大帝诞", DJ), S));
put("5-3", Collections.nCopies(1, D));
put("5-5", Arrays.asList(new FotoFestival("地腊", XL), new FotoFestival("五帝校定生人官爵", XL), J, Y));
put("5-6", Arrays.asList(J, L));
put("5-7", Collections.nCopies(1, J));
put("5-8", Arrays.asList(new FotoFestival("南方五道诞"), T));
put("5-11", Arrays.asList(new FotoFestival("天地仓开日", SS), new FotoFestival("天下都城隍诞")));
put("5-12", Collections.nCopies(1, new FotoFestival("炳灵公诞")));
put("5-13", Collections.nCopies(1, new FotoFestival("关圣降", XL)));
put("5-14", Arrays.asList(new FotoFestival("夜子时为天地交泰", JW), T));
put("5-15", Arrays.asList(W, J, T));
put("5-16", Arrays.asList(new FotoFestival("九毒日", JW), new FotoFestival("天地元气造化万物之辰", JW)));
put("5-17", Collections.nCopies(1, J));
put("5-18", Collections.nCopies(1, new FotoFestival("张天师诞")));
put("5-22", Collections.nCopies(1, new FotoFestival("孝娥神诞", DJ)));
put("5-23", Collections.nCopies(1, T));
put("5-25", Arrays.asList(J, H));
put("5-26", Collections.nCopies(1, J));
put("5-27", Arrays.asList(J, D));
put("5-28", Collections.nCopies(1, R));
put("5-29", Collections.nCopies(1, T));
put("5-30", Arrays.asList(HH, M, T));
put("6-1", Collections.nCopies(1, S));
put("6-3", Arrays.asList(new FotoFestival("韦驮菩萨圣诞"), D, Y));
put("6-5", Collections.nCopies(1, new FotoFestival("南赡部洲转大轮", SS)));
put("6-6", Arrays.asList(new FotoFestival("天地仓开日", SS), L));
put("6-8", Collections.nCopies(1, T));
put("6-10", Collections.nCopies(1, new FotoFestival("金粟如来诞")));
put("6-14", Collections.nCopies(1, T));
put("6-15", Arrays.asList(W, T));
put("6-19", Collections.nCopies(1, new FotoFestival("观世音菩萨成道", DJ)));
put("6-23", Arrays.asList(new FotoFestival("南方火神诞", "犯者遭回禄"), T));
put("6-24", Arrays.asList(new FotoFestival("雷祖诞", XL), new FotoFestival("关帝诞", XL)));
put("6-25", Collections.nCopies(1, H));
put("6-27", Collections.nCopies(1, D));
put("6-28", Collections.nCopies(1, R));
put("6-29", Collections.nCopies(1, T));
put("6-30", Arrays.asList(HH, M, T));
put("7-1", Arrays.asList(S, Y));
put("7-3", Collections.nCopies(1, D));
put("7-5", Collections.nCopies(1, new FotoFestival("中会日", SS, false, "一作初七")));
put("7-6", Collections.nCopies(1, L));
put("7-7", Arrays.asList(new FotoFestival("道德腊", XL), new FotoFestival("五帝校生人善恶", XL), new FotoFestival("魁星诞", XL)));
put("7-8", Collections.nCopies(1, T));
put("7-10", Collections.nCopies(1, new FotoFestival("阴毒日", "", false, "大忌")));
put("7-12", Collections.nCopies(1, new FotoFestival("长真谭真人诞")));
put("7-13", Collections.nCopies(1, new FotoFestival("大势至菩萨诞", JS)));
put("7-14", Arrays.asList(new FotoFestival("三元降", JS), T));
put("7-15", Arrays.asList(W, new FotoFestival("三元降", DJ), new FotoFestival("地官校籍", DJ), T));
put("7-16", Collections.nCopies(1, new FotoFestival("三元降", JS)));
put("7-18", Collections.nCopies(1, new FotoFestival("西王母诞", DJ)));
put("7-19", Collections.nCopies(1, new FotoFestival("太岁诞", DJ)));
put("7-22", Collections.nCopies(1, new FotoFestival("增福财神诞", XL)));
put("7-23", Collections.nCopies(1, T));
put("7-25", Collections.nCopies(1, H));
put("7-27", Collections.nCopies(1, D));
put("7-28", Collections.nCopies(1, R));
put("7-29", Arrays.asList(Y, T));
put("7-30", Arrays.asList(new FotoFestival("地藏菩萨诞", DJ), HH, M, T));
put("8-1", Arrays.asList(S, new FotoFestival("许真君诞")));
put("8-3", Arrays.asList(D, new FotoFestival("北斗诞", XL), new FotoFestival("司命灶君诞", "犯者遭回禄")));
put("8-5", Collections.nCopies(1, new FotoFestival("雷声大帝诞", DJ)));
put("8-6", Collections.nCopies(1, L));
put("8-8", Collections.nCopies(1, T));
put("8-10", Collections.nCopies(1, new FotoFestival("北斗大帝诞")));
put("8-12", Collections.nCopies(1, new FotoFestival("西方五道诞")));
put("8-14", Collections.nCopies(1, T));
put("8-15", Arrays.asList(W, new FotoFestival("太明朝元", "犯者暴亡", false, "宜焚香守夜"), T));
put("8-16", Collections.nCopies(1, new FotoFestival("天曹掠刷真君降", "犯者贫夭")));
put("8-18", Collections.nCopies(1, new FotoFestival("天人兴福之辰", "", false, "宜斋戒,存想吉事")));
put("8-23", Arrays.asList(new FotoFestival("汉恒候张显王诞"), T));
put("8-24", Collections.nCopies(1, new FotoFestival("灶君夫人诞")));
put("8-25", Collections.nCopies(1, H));
put("8-27", Arrays.asList(D, new FotoFestival("至圣先师孔子诞", XL), Y));
put("8-28", Arrays.asList(R, new FotoFestival("四天会事")));
put("8-29", Collections.nCopies(1, T));
put("8-30", Arrays.asList(new FotoFestival("诸神考校", "犯者夺算"), HH, M, T));
put("9-1", Arrays.asList(S, new FotoFestival("南斗诞", XL), new FotoFestival("北斗九星降世", DJ, false, "此九日俱宜斋戒")));
put("9-3", Arrays.asList(D, new FotoFestival("五瘟神诞")));
put("9-6", Collections.nCopies(1, L));
put("9-8", Collections.nCopies(1, T));
put("9-9", Arrays.asList(new FotoFestival("斗母诞", XL), new FotoFestival("酆都大帝诞"), new FotoFestival("玄天上帝飞升")));
put("9-10", Collections.nCopies(1, new FotoFestival("斗母降", DJ)));
put("9-11", Collections.nCopies(1, new FotoFestival("宜戒")));
put("9-13", Collections.nCopies(1, new FotoFestival("孟婆尊神诞")));
put("9-14", Collections.nCopies(1, T));
put("9-15", Arrays.asList(W, T));
put("9-17", Collections.nCopies(1, new FotoFestival("金龙四大王诞", "犯者遭水厄")));
put("9-19", Arrays.asList(new FotoFestival("日宫月宫会合", JS), new FotoFestival("观世音菩萨诞", JS)));
put("9-23", Collections.nCopies(1, T));
put("9-25", Arrays.asList(H, Y));
put("9-27", Collections.nCopies(1, D));
put("9-28", Collections.nCopies(1, R));
put("9-29", Collections.nCopies(1, T));
put("9-30", Arrays.asList(new FotoFestival("药师琉璃光佛诞", "犯者危疾"), HH, M, T));
put("10-1", Arrays.asList(S, new FotoFestival("民岁腊", DJ), new FotoFestival("四天王降", "犯者一年内死")));
put("10-3", Arrays.asList(D, new FotoFestival("三茅诞")));
put("10-5", Arrays.asList(new FotoFestival("下会日", JS), new FotoFestival("达摩祖师诞", JS)));
put("10-6", Arrays.asList(L, new FotoFestival("天曹考察", DJ)));
put("10-8", Arrays.asList(new FotoFestival("佛涅槃日", "", false, "大忌色欲"), T));
put("10-10", Collections.nCopies(1, new FotoFestival("四天王降", "犯者一年内死")));
put("10-11", Collections.nCopies(1, new FotoFestival("宜戒")));
put("10-14", Arrays.asList(new FotoFestival("三元降", JS), T));
put("10-15", Arrays.asList(W, new FotoFestival("三元降", DJ), new FotoFestival("下元水府校籍", DJ), T));
put("10-16", Arrays.asList(new FotoFestival("三元降", JS), T));
put("10-23", Arrays.asList(Y, T));
put("10-25", Collections.nCopies(1, H));
put("10-27", Arrays.asList(D, new FotoFestival("北极紫徽大帝降")));
put("10-28", Collections.nCopies(1, R));
put("10-29", Collections.nCopies(1, T));
put("10-30", Arrays.asList(HH, M, T));
put("11-1", Collections.nCopies(1, S));
put("11-3", Collections.nCopies(1, D));
put("11-4", Collections.nCopies(1, new FotoFestival("至圣先师孔子诞", XL)));
put("11-6", Collections.nCopies(1, new FotoFestival("西岳大帝诞")));
put("11-8", Collections.nCopies(1, T));
put("11-11", Arrays.asList(new FotoFestival("天地仓开日", DJ), new FotoFestival("太乙救苦天尊诞", DJ)));
put("11-14", Collections.nCopies(1, T));
put("11-15", Arrays.asList(new FotoFestival("月望", "上半夜犯男死 下半夜犯女死"), new FotoFestival("四天王巡行", "上半夜犯男死 下半夜犯女死")));
put("11-17", Collections.nCopies(1, new FotoFestival("阿弥陀佛诞")));
put("11-19", Collections.nCopies(1, new FotoFestival("太阳日宫诞", "犯者得奇祸")));
put("11-21", Collections.nCopies(1, Y));
put("11-23", Arrays.asList(new FotoFestival("张仙诞", "犯者绝嗣"), T));
put("11-25", Arrays.asList(new FotoFestival("掠刷大夫降", "犯者遭大凶"), H));
put("11-26", Collections.nCopies(1, new FotoFestival("北方五道诞")));
put("11-27", Collections.nCopies(1, D));
put("11-28", Collections.nCopies(1, R));
put("11-29", Collections.nCopies(1, T));
put("11-30", Arrays.asList(HH, M, T));
put("12-1", Collections.nCopies(1, S));
put("12-3", Collections.nCopies(1, D));
put("12-6", Arrays.asList(new FotoFestival("天地仓开日", JS), L));
put("12-7", Collections.nCopies(1, new FotoFestival("掠刷大夫降", "犯者得恶疾")));
put("12-8", Arrays.asList(new FotoFestival("王侯腊", DJ), new FotoFestival("释迦如来成佛之辰"), T, new FotoFestival("初旬内戊日,亦名王侯腊", DJ)));
put("12-12", Collections.nCopies(1, new FotoFestival("太素三元君朝真")));
put("12-14", Collections.nCopies(1, T));
put("12-15", Arrays.asList(W, T));
put("12-16", Collections.nCopies(1, new FotoFestival("南岳大帝诞")));
put("12-19", Collections.nCopies(1, Y));
put("12-20", Collections.nCopies(1, new FotoFestival("天地交道", "犯者促寿")));
put("12-21", Collections.nCopies(1, new FotoFestival("天猷上帝诞")));
put("12-23", Arrays.asList(new FotoFestival("五岳诞降"), T));
put("12-24", Collections.nCopies(1, new FotoFestival("司今朝天奏人善恶", "犯者得大祸")));
put("12-25", Arrays.asList(new FotoFestival("三清玉帝同降,考察善恶", "犯者得奇祸"), H));
put("12-27", Collections.nCopies(1, D));
put("12-28", Collections.nCopies(1, R));
put("12-29", Arrays.asList(new FotoFestival("华严菩萨诞"), T));
put("12-30", Collections.nCopies(1, new FotoFestival("诸神下降,察访善恶", "犯者男女俱亡")));
}
};
}

File diff suppressed because one or more lines are too long

View File

@@ -27,16 +27,16 @@ public class LunarUtil{
public static final String[] POSITION_YANG_GUI = {"","坤","坤","兑","乾","艮","坎","离","艮","震","巽"};
/** 阴贵方位,《阴贵神歌》:甲戊见牛羊,乙己鼠猴乡,丙丁猪鸡位,壬癸蛇兔藏,庚辛逢虎马,此是贵神方。 */
public static final String[] POSITION_YIN_GUI = {"","艮","坎","乾","兑","坤","坤","艮","离","巽","震"};
/** 福神方位,参考多个黄历而决定采用的《福神方位歌》:甲乙东南是福神,丙丁正东是堪宜,戊北己南庚辛坤,壬在乾方癸在西。 */
/** 流派1《福神方位歌》:甲乙东南是福神,丙丁正东是堪宜,戊北己南庚辛坤,壬在乾方癸在西。 */
public static final String[] POSITION_FU = {"","巽","巽","震","震","坎","离","坤","坤","乾","兑"};
//未采用的《福神方位歌》:甲己正北是福神,丙辛西北乾宫存,乙庚坤位戊癸艮,丁壬巽上好追寻。
//public static final String[] POSITION_FU = {"","坎","坤","乾","巽","艮","坎","坤","乾","巽","艮"};
/** 流派2《福神方位歌》:甲己正北是福神,丙辛西北乾宫存,乙庚坤位戊癸艮,丁壬巽上好追寻。 */
public static final String[] POSITION_FU_2 = {"","坎","坤","乾","巽","艮","坎","坤","乾","巽","艮"};
/** 财神方位,《财神方位歌》:甲乙东北是财神,丙丁向在西南寻,戊己正北坐方位, 庚辛正东去安身,壬癸原来正南坐,便是财神方位真。 */
public static final String[] POSITION_CAI = {"","艮","艮","坤","坤","坎","坎","震","震","离","离"};
/** 逐日胎神方位 */
public static final String[] POSITION_TAI_DAY = {"占门碓外东南","碓磨厕外东南","厨灶炉外正南","仓库门外正南","房床厕外正南","占门床外正南","占碓磨外正南","厨灶厕外西南","仓库炉外西南","房床门外西南","门鸡栖外西南","碓磨床外西南","厨灶碓外西南","仓库厕外西南","房床厕外正南","房床炉外正西","碓磨栖外正西","厨灶床外正西","仓库碓外西北","房床厕外西北","占门炉外西北","碓磨门外西北","厨灶栖外西北","仓库床外西北","房床碓外正北","占门厕外正北","碓磨炉外正北","厨灶门外正北","仓库栖外正北","占房床房内北","占门碓房内北","碓磨厕房内北","厨灶炉房内北","仓库门房内北","门鸡栖外西南","占门床房内南","占碓磨房内南","厨灶厕房内南","仓库炉房内南","房床门房内南","门鸡栖房内东","碓磨床房内东","厨灶碓房内东","仓库厕房内东","房床炉房内东","占大门外东北","碓磨栖外东北","厨灶床外东北","仓库碓外东北","房床厕外东北","占门炉外东北","碓磨门外正东","厨灶栖外正东","仓库床外正东","房床碓外正东","占门厕外正东","碓磨炉外东南","仓库栖外东南","占房床外东南","占门碓外东南"};
public static final String[] POSITION_TAI_DAY = {"占门碓 外东南","碓磨厕 外东南","厨灶炉 外正南","仓库门 外正南","房床栖 外正南","占门床 外正南","占碓磨 外正南","厕灶厨 外西南","仓库炉 外西南","房床门 外西南","门碓栖 外西南","碓磨床 外西南","厨灶碓 外西南","仓库厕 外正西","房床炉 外正西","占大门 外正西","碓磨栖 外正西","厨房床 外正西","仓库碓 外西北","房床厕 外西北","占门炉 外西北","门碓磨 外西北","厨灶栖 外西北","仓库床 外西北","房床碓 外正北","占门厕 外正北","碓磨炉 外正北","厨灶门 外正北","仓库栖 外正北","占房床 房内北","占门碓 房内北","碓磨厕 房内北","厨灶炉 房内北","门仓库 房内北","床房栖 房内中","占门床 房内中","占碓磨 房内南","厨磨厕 房内南","仓库炉 房内南","房床门 房内西","门碓栖 房内东","碓磨床 房内东","厨灶碓 房内东","仓库厕 房内东","房床炉 房内中","占大门 外东北","碓磨栖 外东北","厨灶床 外东北","仓库碓 外东北","房床厕 外东北","占门炉 外东北","门碓磨 外正东","厨灶栖 外正东","仓库床 外正东","房床碓 外正东","占门厕 外正东","碓磨炉 外东南","厨灶门 外东南","仓库栖 外东南","占房床 外东南"};
/** 逐月胎神方位 */
public static final String[] POSITION_TAI_MONTH = {"占房床","占户窗","占门堂","占厨灶","占身床","占床仓","占碓磨","占厕户","占门房","占房床","占炉灶","占房床"};
public static final String[] POSITION_TAI_MONTH = {"占房床","占户窗","占门堂","占厨灶","占房床","占床仓","占碓磨","占厕户","占门房","占房床","占灶炉","占房床"};
/** 地支 */
public static final String[] ZHI = {"","子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"};
/** 六十甲子 */
@@ -130,116 +130,37 @@ public class LunarUtil{
put("12-8","腊八节");
}
};
/** 农历日期对应的非正式节日,参考《寿康宝鉴》 */
/** 传统节日 */
public static final Map<String,List<String>> OTHER_FESTIVAL = new HashMap<String,List<String>>(){
private static final long serialVersionUID = -1;
{
put("1-1",Collections.nCopies(1,"弥勒佛圣诞"));
put("1-8",Collections.nCopies(1,"五殿阎罗天子诞"));
put("1-9",Collections.nCopies(1,"玉皇上帝诞"));
put("1-13",Collections.nCopies(1,"杨公忌"));
put("2-1",Collections.nCopies(1,"一殿秦广王诞"));
put("2-2",Collections.nCopies(1,"福德土地正神诞"));
put("2-3",Collections.nCopies(1,"文昌帝君诞"));
put("2-6",Collections.nCopies(1,"东华帝君诞"));
put("2-8",Collections.nCopies(1,"释迦牟尼佛出家"));
put("2-11",Collections.nCopies(1,"杨公忌"));
put("2-15",Arrays.asList("释迦牟尼佛涅槃","太上老君诞"));
put("2-17",Collections.nCopies(1,"东方杜将军诞"));
put("2-18",Arrays.asList("四殿五官王诞","至圣先师孔子讳辰"));
put("2-19",Collections.nCopies(1,"观音大士诞"));
put("2-21",Collections.nCopies(1,"普贤菩萨诞"));
put("3-1",Collections.nCopies(1,"二殿楚江王诞"));
put("3-3",Collections.nCopies(1,"玄天上帝诞"));
put("3-8",Collections.nCopies(1,"六殿卞城王诞"));
put("3-9",Collections.nCopies(1,"杨公忌"));
put("3-12",Collections.nCopies(1,"中央五道诞"));
put("3-15",Arrays.asList("玄坛诞","昊天上帝诞"));
put("3-16",Collections.nCopies(1,"准提菩萨诞"));
put("3-18",Arrays.asList("中岳大帝诞","后土娘娘诞"));
put("3-20",Collections.nCopies(1,"子孙娘娘诞"));
put("3-27",Collections.nCopies(1,"七殿泰山王诞"));
put("3-28",Collections.nCopies(1,"苍颉至圣先师诞"));
put("4-1",Collections.nCopies(1,"八殿都市王诞"));
put("4-4",Collections.nCopies(1,"文殊菩萨诞"));
put("4-7",Collections.nCopies(1,"杨公忌"));
put("4-8",Arrays.asList("释迦牟尼佛诞","九殿平等王诞"));
put("4-14",Collections.nCopies(1,"纯阳祖师诞"));
put("4-15",Collections.nCopies(1,"钟离祖师诞"));
put("4-17",Collections.nCopies(1,"十殿转轮王诞"));
put("4-18",Collections.nCopies(1,"紫徽大帝诞"));
put("4-20",Collections.nCopies(1,"眼光圣母诞"));
put("5-1",Collections.nCopies(1,"南极长生大帝诞"));
put("5-5",Collections.nCopies(1,"杨公忌"));
put("5-8",Collections.nCopies(1,"南方五道诞"));
put("5-11",Collections.nCopies(1,"天下都城隍诞"));
put("5-12",Collections.nCopies(1,"炳灵公诞"));
put("5-13",Collections.nCopies(1,"关圣降"));
put("5-16",Collections.nCopies(1,"天地元气造化万物之辰"));
put("5-18",Collections.nCopies(1,"张天师诞"));
put("5-22",Collections.nCopies(1,"孝娥神诞"));
put("6-3",Collections.nCopies(1,"杨公忌"));
put("6-10",Collections.nCopies(1,"金粟如来诞"));
put("6-13",Collections.nCopies(1,"井泉龙王诞"));
put("6-19",Collections.nCopies(1,"观音大士涅槃"));
put("6-23",Collections.nCopies(1,"南方火神诞"));
put("6-24",Arrays.asList("雷祖诞","关帝诞"));
put("7-1",Collections.nCopies(1,"杨公忌"));
put("7-7",Collections.nCopies(1,"魁星诞"));
put("7-12",Collections.nCopies(1,"长真谭真人诞"));
put("7-13",Collections.nCopies(1,"大势至菩萨诞"));
put("7-15",Collections.nCopies(1,"中元节"));
put("7-18",Collections.nCopies(1,"西王母诞"));
put("7-19",Collections.nCopies(1,"太岁诞"));
put("7-22",Collections.nCopies(1,"增福财神诞"));
put("7-29",Collections.nCopies(1,"杨公忌"));
put("7-30",Collections.nCopies(1,"地藏菩萨诞"));
put("8-1",Collections.nCopies(1,"许真君诞"));
put("8-3",Collections.nCopies(1,"司命灶君诞"));
put("8-5",Collections.nCopies(1,"雷声大帝诞"));
put("8-10",Collections.nCopies(1,"北斗大帝诞"));
put("8-12",Collections.nCopies(1,"西方五道诞"));
put("8-16",Collections.nCopies(1,"天曹掠刷真君降"));
put("8-18",Collections.nCopies(1,"天人兴福之辰"));
put("8-23",Collections.nCopies(1,"汉恒候张显王诞"));
put("8-24",Collections.nCopies(1,"灶君夫人诞"));
put("8-27",Arrays.asList("至圣先师孔子诞","杨公忌"));
put("9-1",Collections.nCopies(1,"北斗九星降"));
put("9-2",Collections.nCopies(1,"北斗九星降"));
put("9-3",Arrays.asList("北斗九星降","五瘟神诞"));
put("9-4",Collections.nCopies(1,"北斗九星降"));
put("9-5",Collections.nCopies(1,"北斗九星降"));
put("9-6",Collections.nCopies(1,"北斗九星降"));
put("9-7",Collections.nCopies(1,"北斗九星降"));
put("9-8",Collections.nCopies(1,"北斗九星降"));
put("9-9",Arrays.asList("北斗九星降","酆都大帝诞"));
put("9-13",Collections.nCopies(1,"孟婆尊神诞"));
put("9-17",Collections.nCopies(1,"金龙四大王诞"));
put("9-19",Collections.nCopies(1,"观世音菩萨出家"));
put("9-25",Collections.nCopies(1,"杨公忌"));
put("9-30",Collections.nCopies(1,"药师琉璃光佛诞"));
put("1-4",Collections.nCopies(1,"接神日"));
put("1-5",Collections.nCopies(1,"隔开日"));
put("1-7",Collections.nCopies(1,"人日"));
put("1-8",Arrays.asList("谷日", "顺星节"));
put("1-9",Collections.nCopies(1,"天日"));
put("1-10",Collections.nCopies(1,"地日"));
put("1-20",Collections.nCopies(1,"天穿节"));
put("1-25",Collections.nCopies(1,"填仓节"));
put("1-30",Collections.nCopies(1,"正月晦"));
put("2-1",Collections.nCopies(1,"中和节"));
put("2-2",Collections.nCopies(1,"春社"));
put("3-3",Collections.nCopies(1,"上巳节"));
put("5-20",Collections.nCopies(1,"分龙节"));
put("5-25",Collections.nCopies(1,"会龙节"));
put("6-6",Collections.nCopies(1,"天贶节"));
put("6-24",Collections.nCopies(1,"观莲节"));
put("6-25",Collections.nCopies(1,"五谷母节"));
put("7-14",Collections.nCopies(1,"中元节"));
put("7-22",Collections.nCopies(1,"财神节"));
put("7-29",Collections.nCopies(1,"地藏节"));
put("8-1",Collections.nCopies(1,"天灸日"));
put("10-1",Collections.nCopies(1,"寒衣节"));
put("10-3",Collections.nCopies(1,"三茅诞"));
put("10-5",Collections.nCopies(1,"达摩祖师诞"));
put("10-8",Collections.nCopies(1,"佛涅槃日"));
put("10-10",Collections.nCopies(1,"十成节"));
put("10-15",Collections.nCopies(1,"下元节"));
put("10-23",Collections.nCopies(1,"杨公忌"));
put("10-27",Collections.nCopies(1,"北极紫薇大帝降"));
put("11-4",Collections.nCopies(1,"至圣先师孔子诞"));
put("11-6",Collections.nCopies(1,"西岳大帝诞"));
put("11-11",Collections.nCopies(1,"太乙救苦天尊诞"));
put("11-17",Collections.nCopies(1,"阿弥陀佛诞"));
put("11-19",Collections.nCopies(1,"太阳日宫诞"));
put("11-21",Collections.nCopies(1,"杨公忌"));
put("11-23",Collections.nCopies(1,"张仙诞"));
put("11-25",Collections.nCopies(1,"掠刷大夫降"));
put("11-26",Collections.nCopies(1,"北方五道诞"));
put("12-8",Collections.nCopies(1,"释迦如来成佛之辰"));
put("12-16",Collections.nCopies(1,"南岳大帝诞"));
put("12-19",Collections.nCopies(1,"杨公忌"));
put("12-21",Collections.nCopies(1,"天猷上帝诞"));
put("12-23",Arrays.asList("小年","五岳神降"));
put("12-29",Collections.nCopies(1,"华严菩萨诞"));
put("12-7",Collections.nCopies(1,"驱傩日"));
put("12-16",Collections.nCopies(1,"尾牙"));
put("12-24",Collections.nCopies(1,"祭灶日"));
}
};
/** 28星宿对照表,地支+星期 */

View File

@@ -0,0 +1,21 @@
package test;
import com.nlf.calendar.Foto;
import com.nlf.calendar.Lunar;
import org.junit.Assert;
import org.junit.Test;
/**
* 佛历测试
*
* @author 6tail
*/
public class FotoTest {
@Test
public void test() {
Foto foto = Foto.fromLunar(Lunar.fromYmd(2021, 10, 14));
Assert.assertEquals("二五六五年十月十四 (三元降 犯者减寿) (四天王巡行)", foto.toFullString());
}
}

View File

@@ -173,4 +173,17 @@ public class JieQiTest {
Assert.assertEquals("冬至", lunar.getPrevQi().getName());
Assert.assertEquals("冬至", lunar.getPrevJieQi().getName());
}
@Test
public void test7() {
Lunar lunar = Lunar.fromYmd(2012, 9, 1);
Assert.assertEquals("2012-09-07 13:29:00", lunar.getJieQiTable().get("白露").toYmdHms());
}
@Test
public void test8() {
Lunar lunar = Lunar.fromYmd(2050, 12, 1);
Assert.assertEquals("2050-12-07 06:41:00", lunar.getJieQiTable().get("大雪").toYmdHms());
}
}

View File

@@ -16,7 +16,7 @@ public class LunarTest {
public void test() {
Lunar date = new Lunar(2019, 3, 27, 0, 0, 0);
Assert.assertEquals("二〇一九年三月廿七", date.toString());
Assert.assertEquals("二〇一九年三月廿七 己亥(猪)年 戊辰(龙)月 戊戌(狗)日 子(鼠)时 纳音[平地木 大林木 平地木 桑柘木] 星期三 (七殿泰山王诞) 西方白虎 星宿[参水猿](吉) 彭祖百忌[戊不受田田主不祥 戌不吃犬作怪上床] 喜神方位[巽](东南) 阳贵神方位[艮](东北) 阴贵神方位[坤](西南) 福神方位[坎](正北) 财神方位[坎](正北) 冲[(壬辰)龙] 煞[北]", date.toFullString());
Assert.assertEquals("二〇一九年三月廿七 己亥(猪)年 戊辰(龙)月 戊戌(狗)日 子(鼠)时 纳音[平地木 大林木 平地木 桑柘木] 星期三 西方白虎 星宿[参水猿](吉) 彭祖百忌[戊不受田田主不祥 戌不吃犬作怪上床] 喜神方位[巽](东南) 阳贵神方位[艮](东北) 阴贵神方位[坤](西南) 福神方位[艮](东北) 财神方位[坎](正北) 冲[(壬辰)龙] 煞[北]", date.toFullString());
Assert.assertEquals("2019-05-01", date.getSolar().toString());
Assert.assertEquals("2019-05-01 00:00:00 星期三 (劳动节) 金牛座", date.getSolar().toFullString());
}
@@ -352,4 +352,39 @@ public class LunarTest {
Assert.assertEquals("子命互禄 辛命进禄", lunar.getDayLu());
}
@Test
public void test48() {
Solar solar = Solar.fromYmd(2021, 11, 13);
Lunar lunar = solar.getLunar();
Assert.assertEquals("碓磨厕 外东南", lunar.getDayPositionTai());
}
@Test
public void test49() {
Solar solar = Solar.fromYmd(2021, 11, 12);
Lunar lunar = solar.getLunar();
Assert.assertEquals("占门碓 外东南", lunar.getDayPositionTai());
}
@Test
public void test50() {
Solar solar = Solar.fromYmd(2021, 11, 13);
Lunar lunar = solar.getLunar();
Assert.assertEquals("西南", lunar.getDayPositionFuDesc());
}
@Test
public void test51() {
Solar solar = Solar.fromYmd(2021, 11, 12);
Lunar lunar = solar.getLunar();
Assert.assertEquals("正北", lunar.getDayPositionFuDesc());
}
@Test
public void test52() {
Solar solar = Solar.fromYmd(2011, 11, 12);
Lunar lunar = solar.getLunar();
Assert.assertEquals("厕灶厨 外西南", lunar.getDayPositionTai());
}
}

View File

@@ -18,7 +18,7 @@ public class SolarTest {
Assert.assertEquals("2019-05-01",date.toString());
Assert.assertEquals("2019-05-01 00:00:00 星期三 (劳动节) 金牛座",date.toFullString());
Assert.assertEquals("二〇一九年三月廿七",date.getLunar().toString());
Assert.assertEquals("二〇一九年三月廿七 己亥(猪)年 戊辰(龙)月 戊戌(狗)日 子(鼠)时 纳音[平地木 大林木 平地木 桑柘木] 星期三 (七殿泰山王诞) 西方白虎 星宿[参水猿](吉) 彭祖百忌[戊不受田田主不祥 戌不吃犬作怪上床] 喜神方位[巽](东南) 阳贵神方位[艮](东北) 阴贵神方位[坤](西南) 福神方位[坎](正北) 财神方位[坎](正北) 冲[(壬辰)龙] 煞[北]",date.getLunar().toFullString());
Assert.assertEquals("二〇一九年三月廿七 己亥(猪)年 戊辰(龙)月 戊戌(狗)日 子(鼠)时 纳音[平地木 大林木 平地木 桑柘木] 星期三 西方白虎 星宿[参水猿](吉) 彭祖百忌[戊不受田田主不祥 戌不吃犬作怪上床] 喜神方位[巽](东南) 阳贵神方位[艮](东北) 阴贵神方位[坤](西南) 福神方位[艮](东北) 财神方位[坎](正北) 冲[(壬辰)龙] 煞[北]",date.getLunar().toFullString());
}
@Test