Skip to content

Commit e8a8f58

Browse files
authored
Merge pull request #44 from fumiyasac/feature/2025-update-library
2025年の祝祭日テストケースを追加
2 parents 4529f36 + ca7047a commit e8a8f58

File tree

7 files changed

+286
-45
lines changed

7 files changed

+286
-45
lines changed

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.7
1+
// swift-tools-version:5.9
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public func judgeJapaneseHoliday(year: Int, month: Int, day: Int) -> Bool {
2929

3030
### Requirements & Support
3131

32-
+ iOS 13.0 or later
32+
+ iOS 14.0 or later
3333
+ macOS 11.0 or later
3434

3535
### Installation
@@ -43,7 +43,7 @@ Create Podfile and specify it in your Podfile:
4343
★ Example of Podfile
4444

4545
```
46-
platform :ios, '13.0'
46+
platform :ios, '14.0'
4747
use_frameworks!
4848
target [YOUR PROJECT NAME]' do
4949
pod 'CalculateCalendarLogic'
@@ -156,7 +156,7 @@ public func judgeJapaneseHoliday(year: Int, month: Int, day: Int) -> Bool {
156156

157157
### 対応バージョンとサポート
158158

159-
+ iOS 13.0 or later
159+
+ iOS 14.0 or later
160160
+ macOS 11.0 or later
161161

162162
### 導入方法
@@ -232,7 +232,7 @@ print("2016年1月1日:\(result)")
232232

233233
現行プログラムでCalculateCalendarLogic.swiftで考慮したテストケースは下記の通りです。
234234

235-
+ 今年(2016年〜2022年)の祝祭日の判定が正しく行えていること
235+
+ 今年(2016年〜2025年)の祝祭日の判定が正しく行えていること
236236
+ ゴールデンウィークの判定が正しく行えていること(※サンプル:2017年/2019年/2021年)
237237
+ シルバーウィークの判定が正しく行えていること(※サンプル:2015年/2026年/2032年)
238238
+ 春分の日・秋分の日の判定が正しく行えていること(※サンプル:2000年〜2030年)
@@ -247,6 +247,7 @@ print("2016年1月1日:\(result)")
247247

248248
まだまだ甘い部分があるかもしれませんが、その際はPullRequest等を送っていただければ幸いです。アプリ開発の中でこのサンプルが少しでもお役にたつ事ができれば嬉しい限りです。
249249

250+
+ 2025.01.02: 保守対応を行いました。
250251
+ 2023.01.01: 保守対応&iOS16で利用可能なUICalendarViewのサンプル追加を行いました。
251252
+ 2021.06.05: Gihub Actions追加([uhooi](https://github.com/uhooi)様)
252253
+ 2020.12.02: Xcode12.2への対応/2021年の祝日に関する追加対応/サンプルコード修正等を行いました。

Tests/CalculateCalendarLogicTests/CalculateCalendarLogicTests.swift

+61-2
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ class CalculateCalendarLogicTests: XCTestCase {
532532
// 振替休日: 2024年9月23日(月曜日)
533533
(2024, 9, 23, true),
534534

535-
// スポーツの日: 2023年10月14日(月曜日)
535+
// スポーツの日: 2024年10月14日(月曜日)
536536
(2024, 10, 14, true),
537537

538538
// 文化の日: 2024年11月3日(日曜日)
@@ -541,8 +541,67 @@ class CalculateCalendarLogicTests: XCTestCase {
541541
// 振替休日: 2024年11月4日(月曜日)
542542
(2024, 11, 4, true),
543543

544-
// 勤労感謝の日: 2023年11月23日(土曜日)
544+
// 勤労感謝の日: 2024年11月23日(土曜日)
545545
(2024, 11, 23, true),
546+
547+
// 2025年
548+
// 元日: 2025年1月1日(水曜日)
549+
(2025, 1, 1, true),
550+
551+
// 成人の日: 2025年1月13日(月曜日)
552+
(2025, 1, 13, true),
553+
554+
// 建国記念の日: 2025年2月11日(火曜日)
555+
(2025, 2, 11, true),
556+
557+
// 天皇誕生日: 2024年2月23日(日曜日)
558+
(2025, 2, 23, true),
559+
560+
// 振替休日: 2024年2月24日(月曜日)
561+
(2025, 2, 24, true),
562+
563+
// 春分の日: 2024年3月20日(木曜日)
564+
(2025, 3, 20, true),
565+
566+
// 昭和の日: 2025年4月29日(火曜日)
567+
(2025, 4, 29, true),
568+
569+
// 憲法記念日: 2025年5月3日(土曜日)
570+
(2025, 5, 3, true),
571+
572+
// みどりの日: 2025年5月4日(日曜日)
573+
(2025, 5, 4, true),
574+
575+
// こどもの日: 2025年5月5日(月曜日)
576+
(2025, 5, 5, true),
577+
578+
// 振替休日: 2025年5月6日(月曜日)
579+
(2025, 5, 6, true),
580+
581+
// 海の日: 2025年7月21日(月曜日)
582+
(2025, 7, 21, true),
583+
584+
// 山の日: 2025年8月11日(月曜日)
585+
(2025, 8, 11, true),
586+
587+
// 敬老の日: 2025年9月15日(月曜日)
588+
(2025, 9, 15, true),
589+
590+
// 秋分の日: 2025年9月23日(火曜日)
591+
(2025, 9, 23, true),
592+
593+
// スポーツの日: 2025年10月13日(月曜日)
594+
(2025, 10, 13, true),
595+
596+
// 文化の日: 2025年11月3日(月曜日)
597+
(2025, 11, 3, true),
598+
599+
// 勤労感謝の日: 2025年11月23日(日曜日)
600+
(2025, 11, 23, true),
601+
602+
// 振替休日: 2025年11月24日(月曜日)
603+
(2025, 11, 24, true),
604+
546605
]
547606
testCases.forEach { (arg) in
548607

0 commit comments

Comments
 (0)