|
|
@ -37,8 +37,20 @@ public abstract class HolidaysUtils {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private static final String githubHolidaysURL2 = "https://cdn.jsdelivr.net/gh/NateScarlet/holiday-cn@master/%s.json";
|
|
|
|
private static final String githubHolidaysURL2 = "https://cdn.jsdelivr.net/gh/NateScarlet/holiday-cn@master/%s.json";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 获取今年的节假日列表
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
public static Holidays get() {
|
|
|
|
public static Holidays get() {
|
|
|
|
int year = DateUtil.thisYear();
|
|
|
|
return get(DateUtil.thisYear());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 获取指定年份的节假日列表
|
|
|
|
|
|
|
|
* @param year
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static Holidays get(Integer year) {
|
|
|
|
if (cache.containsKey(year)) {
|
|
|
|
if (cache.containsKey(year)) {
|
|
|
|
return cache.get(year);
|
|
|
|
return cache.get(year);
|
|
|
|
}
|
|
|
|
}
|
|
|
|