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

Method getFestivals

src/main/java/com/nlf/calendar/Lunar.java:954–964  ·  view source on GitHub ↗

获取节日,有可能一天会有多个节日 @return 节日列表,如春节

()

Source from the content-addressed store, hash-verified

952 * @return 节日列表,如春节
953 */
954 public List<String> getFestivals() {
955 List<String> l = new ArrayList<String>();
956 String f = LunarUtil.FESTIVAL.get(month + "-" + day);
957 if (null != f) {
958 l.add(f);
959 }
960 if (Math.abs(month) == 12 && day >= 29 && year != next(1).getYear()) {
961 l.add("除夕");
962 }
963 return l;
964 }
965
966 /**
967 * 获取非正式的节日,有可能一天会有多个节日

Callers 6

testMethod · 0.95
test18Method · 0.95
test19Method · 0.95
test20Method · 0.95
test21Method · 0.95
toFullStringMethod · 0.95

Calls 2

nextMethod · 0.95
getYearMethod · 0.45

Tested by 5

testMethod · 0.76
test18Method · 0.76
test19Method · 0.76
test20Method · 0.76
test21Method · 0.76