Skip to content

Commit

Permalink
feat: 2025년 국군의 날 임시공휴일 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
sixmen committed Oct 24, 2024
1 parent d476f60 commit 84a3def
Show file tree
Hide file tree
Showing 9 changed files with 137 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/cjs/year_holidays/2025.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { IYearHolidays } from './types.js';
export declare const HOLIDAYS_2025: IYearHolidays;
42 changes: 42 additions & 0 deletions lib/cjs/year_holidays/2025.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HOLIDAYS_2025 = void 0;
exports.HOLIDAYS_2025 = {
1: {
1: true, // 새해
28: true, // 설날 연휴
29: true, // 설날
30: true, // 설날 연휴
},
2: {},
3: {
1: true, // 삼일절
3: true, // 삼일절 대체공휴일
},
4: {},
5: {
1: true, // 근로자의 날
5: true, // 어린이날, 부처님 오신날
6: true, // 부처님 오신날 대체공휴일
},
6: {
6: true, // 현충일
},
7: {},
8: {
15: true, // 광복절
},
9: {},
10: {
3: true, // 개천절
5: true, // 추석 연휴
6: true, // 추석
7: true, // 추석 연휴
8: true, // 추석 대체공휴일
9: true, // 한글날
},
11: {},
12: {
25: true, // 성탄절
},
};
2 changes: 2 additions & 0 deletions lib/cjs/year_holidays/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ var _2021_js_1 = require("./2021.js");
var _2022_js_1 = require("./2022.js");
var _2023_js_1 = require("./2023.js");
var _2024_js_1 = require("./2024.js");
var _2025_js_1 = require("./2025.js");
// 토, 일요일 정보는 포함하지 않음
exports.KOREAN_HOLIDAYS = {
2019: _2019_js_1.HOLIDAYS_2019,
Expand All @@ -15,6 +16,7 @@ exports.KOREAN_HOLIDAYS = {
2022: _2022_js_1.HOLIDAYS_2022,
2023: _2023_js_1.HOLIDAYS_2023,
2024: _2024_js_1.HOLIDAYS_2024,
2025: _2025_js_1.HOLIDAYS_2025,
};
var fallback_js_1 = require("./fallback.js");
Object.defineProperty(exports, "HOLIDAYS_FALLBACK", { enumerable: true, get: function () { return fallback_js_1.HOLIDAYS_FALLBACK; } });
2 changes: 2 additions & 0 deletions lib/esm/year_holidays/2025.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { IYearHolidays } from './types.js';
export declare const HOLIDAYS_2025: IYearHolidays;
39 changes: 39 additions & 0 deletions lib/esm/year_holidays/2025.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
export var HOLIDAYS_2025 = {
1: {
1: true, // 새해
28: true, // 설날 연휴
29: true, // 설날
30: true, // 설날 연휴
},
2: {},
3: {
1: true, // 삼일절
3: true, // 삼일절 대체공휴일
},
4: {},
5: {
1: true, // 근로자의 날
5: true, // 어린이날, 부처님 오신날
6: true, // 부처님 오신날 대체공휴일
},
6: {
6: true, // 현충일
},
7: {},
8: {
15: true, // 광복절
},
9: {},
10: {
3: true, // 개천절
5: true, // 추석 연휴
6: true, // 추석
7: true, // 추석 연휴
8: true, // 추석 대체공휴일
9: true, // 한글날
},
11: {},
12: {
25: true, // 성탄절
},
};
2 changes: 2 additions & 0 deletions lib/esm/year_holidays/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { HOLIDAYS_2021 } from './2021.js';
import { HOLIDAYS_2022 } from './2022.js';
import { HOLIDAYS_2023 } from './2023.js';
import { HOLIDAYS_2024 } from './2024.js';
import { HOLIDAYS_2025 } from './2025.js';
// 토, 일요일 정보는 포함하지 않음
export var KOREAN_HOLIDAYS = {
2019: HOLIDAYS_2019,
Expand All @@ -12,5 +13,6 @@ export var KOREAN_HOLIDAYS = {
2022: HOLIDAYS_2022,
2023: HOLIDAYS_2023,
2024: HOLIDAYS_2024,
2025: HOLIDAYS_2025,
};
export { HOLIDAYS_FALLBACK } from './fallback.js';
41 changes: 41 additions & 0 deletions src/year_holidays/2025.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { IYearHolidays } from './types.js';

export const HOLIDAYS_2025: IYearHolidays = {
1: {
1: true, // 새해
28: true, // 설날 연휴
29: true, // 설날
30: true, // 설날 연휴
},
2: {},
3: {
1: true, // 삼일절
3: true, // 삼일절 대체공휴일
},
4: {},
5: {
1: true, // 근로자의 날
5: true, // 어린이날, 부처님 오신날
6: true, // 부처님 오신날 대체공휴일
},
6: {
6: true, // 현충일
},
7: {},
8: {
15: true, // 광복절
},
9: {},
10: {
3: true, // 개천절
5: true, // 추석 연휴
6: true, // 추석
7: true, // 추석 연휴
8: true, // 추석 대체공휴일
9: true, // 한글날
},
11: {},
12: {
25: true, // 성탄절
},
};
2 changes: 2 additions & 0 deletions src/year_holidays/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { HOLIDAYS_2021 } from './2021.js';
import { HOLIDAYS_2022 } from './2022.js';
import { HOLIDAYS_2023 } from './2023.js';
import { HOLIDAYS_2024 } from './2024.js';
import { HOLIDAYS_2025 } from './2025.js';
import { IYearHolidays } from './types.js';

// 토, 일요일 정보는 포함하지 않음
Expand All @@ -14,6 +15,7 @@ export const KOREAN_HOLIDAYS: Record<number, IYearHolidays | undefined> = {
2022: HOLIDAYS_2022,
2023: HOLIDAYS_2023,
2024: HOLIDAYS_2024,
2025: HOLIDAYS_2025,
};

export { HOLIDAYS_FALLBACK } from './fallback.js';
5 changes: 5 additions & 0 deletions test/getNextKoreanBusinessDayYmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ describe('getNextKoreanBusinessDayYmd', () => {
expect(getNextKoreanBusinessDayYmd(20240911, 17)).to.eql(20241014);
});

it('2025', () => {
expect(getNextKoreanBusinessDayYmd(20250430, 4)).to.eql(20250509);
expect(getNextKoreanBusinessDayYmd(20250911, 17)).to.eql(20251013);
});

it('fallback year', () => {
expect(getNextKoreanBusinessDayYmd(20500531, 4)).to.eql(20500607);
expect(getNextKoreanBusinessDayYmd(20500915, 17)).to.eql(20501011);
Expand Down

0 comments on commit 84a3def

Please sign in to comment.