Skip to content

Commit

Permalink
✨ mica-holidays 添加 2025 节假日
Browse files Browse the repository at this point in the history
  • Loading branch information
li-xunhuan committed Nov 12, 2024
1 parent fc06dea commit f2bd070
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ public DaysType getDaysType(LocalDate localDate) {

@Override
public void afterPropertiesSet() throws Exception {
int[] years = new int[]{2019, 2020, 2021, 2022, 2023, 2024};
for (int year : years) {
Resource resource = resourceLoader.getResource("classpath:data/" + year + "_data.json");
try (InputStream inputStream = resource.getInputStream()) {
Map<String, Byte> dataMap = JsonUtil.readMap(inputStream, Byte.class);
YEAR_DATA_MAP.put(year, dataMap);
}
}
int[] years = new int[]{2019, 2020, 2021, 2022, 2023, 2024, 2025};
for (int year : years) {
Resource resource = resourceLoader.getResource("classpath:data/" + year + "_data.json");
try (InputStream inputStream = resource.getInputStream()) {
Map<String, Byte> dataMap = JsonUtil.readMap(inputStream, Byte.class);
YEAR_DATA_MAP.put(year, dataMap);
}
}
List<HolidaysApiProperties.ExtData> extDataList = properties.getExtData();
for (HolidaysApiProperties.ExtData extData : extDataList) {
String dataPath = extData.getDataPath();
Expand Down
35 changes: 35 additions & 0 deletions mica-holidays/src/main/resources/data/2025_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"1001": 2,
"1002": 2,
"1003": 2,
"1004": 1,
"1005": 1,
"1006": 2,
"1007": 1,
"1008": 1,
"1011": 0,
"0101": 2,
"0128": 2,
"0129": 2,
"0130": 2,
"0131": 2,
"0201": 1,
"0202": 1,
"0203": 1,
"0204": 1,
"0404": 2,
"0405": 1,
"0406": 1,
"0501": 2,
"0502": 1,
"0503": 1,
"0504": 1,
"0505": 1,
"0531": 2,
"0601": 1,
"0602": 1,
"0126": 0,
"0208": 0,
"0427": 0,
"0928": 0
}

0 comments on commit f2bd070

Please sign in to comment.