1
0
mirror of synced 2026-10-24 15:36:11 +08:00

v1.2.8 新增佛历Foto;更改Lunar中的getOtherFestivals方法为传统节日。

This commit is contained in:
6tail
2021-10-29 23:23:34 +08:00
parent a783dbd93f
commit d9d7182731
11 changed files with 555 additions and 111 deletions

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;
}
@@ -2642,4 +2645,13 @@ public class Lunar {
return l;
}
/**
* 获取佛历
*
* @return 佛历
*/
public Foto getFoto() {
return Foto.fromLunar(this);
}
}