v1.2.8 新增佛历Foto;更改Lunar中的getOtherFestivals方法为传统节日。
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -2642,4 +2645,13 @@ public class Lunar {
|
||||
return l;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取佛历
|
||||
*
|
||||
* @return 佛历
|
||||
*/
|
||||
public Foto getFoto() {
|
||||
return Foto.fromLunar(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user