获取节日,有可能一天会有多个节日 @return 节日列表,如春节
()
| 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 | * 获取非正式的节日,有可能一天会有多个节日 |