MCPcopy Create free account
hub / github.com/6tail/lunar-java / getFestivals

Method getFestivals

src/main/java/com/nlf/calendar/Tao.java:72–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70 }
71
72 public List<TaoFestival> getFestivals() {
73 List<TaoFestival> l = new ArrayList<TaoFestival>();
74 List<TaoFestival> fs = TaoUtil.FESTIVAL.get(getMonth() + "-" + getDay());
75 if (null != fs) {
76 l.addAll(fs);
77 }
78 String jq = lunar.getJieQi();
79 if ("冬至".equals(jq)) {
80 l.add(new TaoFestival("元始天尊圣诞"));
81 } else if ("夏至".equals(jq)) {
82 l.add(new TaoFestival("灵宝天尊圣诞"));
83 }
84 // 八节日
85 String f = TaoUtil.BA_JIE.get(jq);
86 if (null != f) {
87 l.add(new TaoFestival(f));
88 }
89 // 八会日
90 f = TaoUtil.BA_HUI.get(lunar.getDayInGanZhi());
91 if (null != f) {
92 l.add(new TaoFestival(f));
93 }
94 return l;
95 }
96
97 private boolean isDayIn(String[] days) {
98 String md = getMonth() + "-" + getDay();

Callers 2

test1Method · 0.95
testMethod · 0.45

Calls 4

getMonthMethod · 0.95
getDayMethod · 0.95
getJieQiMethod · 0.80
getDayInGanZhiMethod · 0.80

Tested by 2

test1Method · 0.76
testMethod · 0.36