v1.2.11 修正胎神数据;增加福神流派。
This commit is contained in:
@@ -16,7 +16,7 @@ lunar是一款无第三方依赖的公历(阳历)和农历(阴历、老黄历)
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.6tail</groupId>
|
<groupId>cn.6tail</groupId>
|
||||||
<artifactId>lunar</artifactId>
|
<artifactId>lunar</artifactId>
|
||||||
<version>1.2.10</version>
|
<version>1.2.11</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ lunar is a calendar library for Solar and Chinese Lunar.
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.6tail</groupId>
|
<groupId>cn.6tail</groupId>
|
||||||
<artifactId>lunar</artifactId>
|
<artifactId>lunar</artifactId>
|
||||||
<version>1.2.10</version>
|
<version>1.2.11</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -7,7 +7,7 @@
|
|||||||
<groupId>cn.6tail</groupId>
|
<groupId>cn.6tail</groupId>
|
||||||
<artifactId>lunar</artifactId>
|
<artifactId>lunar</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>1.2.10</version>
|
<version>1.2.11</version>
|
||||||
<name>${project.groupId}:${project.artifactId}</name>
|
<name>${project.groupId}:${project.artifactId}</name>
|
||||||
<url>https://github.com/6tail/lunar-java</url>
|
<url>https://github.com/6tail/lunar-java</url>
|
||||||
<description>a calendar library for Solar and Chinese Lunar</description>
|
<description>a calendar library for Solar and Chinese Lunar</description>
|
||||||
|
|||||||
@@ -1178,12 +1178,22 @@ public class Lunar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取日福神方位描述
|
* 获取日福神方位描述(默认流派:2)
|
||||||
*
|
*
|
||||||
* @return 福神方位描述,如东北
|
* @return 福神方位描述,如东北
|
||||||
*/
|
*/
|
||||||
public String getDayPositionFuDesc() {
|
public String getDayPositionFuDesc() {
|
||||||
return LunarUtil.POSITION_DESC.get(getDayPositionFu());
|
return getDayPositionFuDesc(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取日福神方位描述
|
||||||
|
*
|
||||||
|
* @param sect 流派,1或2
|
||||||
|
* @return 福神方位描述,如东北
|
||||||
|
*/
|
||||||
|
public String getDayPositionFuDesc(int sect) {
|
||||||
|
return LunarUtil.POSITION_DESC.get(getDayPositionFu(sect));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1278,12 +1288,22 @@ public class Lunar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取时辰福神方位描述
|
* 获取时辰福神方位描述,默认流派2
|
||||||
*
|
*
|
||||||
* @return 福神方位描述,如东北
|
* @return 福神方位描述,如东北
|
||||||
*/
|
*/
|
||||||
public String getTimePositionFuDesc() {
|
public String getTimePositionFuDesc() {
|
||||||
return LunarUtil.POSITION_DESC.get(getTimePositionFu());
|
return getTimePositionFuDesc(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取时辰福神方位描述
|
||||||
|
*
|
||||||
|
* @param sect 流派,1或2
|
||||||
|
* @return 福神方位描述,如东北
|
||||||
|
*/
|
||||||
|
public String getTimePositionFuDesc(int sect) {
|
||||||
|
return LunarUtil.POSITION_DESC.get(getTimePositionFu(sect));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -136,21 +136,41 @@ public class LunarTime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取福神方位
|
* 获取福神方位(默认流派:2)
|
||||||
*
|
*
|
||||||
* @return 福神方位,如艮
|
* @return 福神方位,如艮
|
||||||
*/
|
*/
|
||||||
public String getPositionFu() {
|
public String getPositionFu() {
|
||||||
return LunarUtil.POSITION_FU[ganIndex + 1];
|
return getPositionFu(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取福神方位
|
||||||
|
*
|
||||||
|
* @param sect 流派,1或2
|
||||||
|
* @return 福神方位,如艮
|
||||||
|
*/
|
||||||
|
public String getPositionFu(int sect) {
|
||||||
|
return (1 == sect ? LunarUtil.POSITION_FU : LunarUtil.POSITION_FU_2)[ganIndex + 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取福神方位描述(默认流派:2)
|
||||||
|
*
|
||||||
|
* @return 福神方位描述,如东北
|
||||||
|
*/
|
||||||
|
public String getPositionFuDesc() {
|
||||||
|
return getPositionFuDesc(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取福神方位描述
|
* 获取福神方位描述
|
||||||
*
|
*
|
||||||
|
* @param sect 流派,1或2
|
||||||
* @return 福神方位描述,如东北
|
* @return 福神方位描述,如东北
|
||||||
*/
|
*/
|
||||||
public String getPositionFuDesc() {
|
public String getPositionFuDesc(int sect) {
|
||||||
return LunarUtil.POSITION_DESC.get(getPositionFu());
|
return LunarUtil.POSITION_DESC.get(getPositionFu(sect));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user