-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #375 from rakuyoMo/feature/CalendarData-years
Allows more flexibility in setting year ranges
- Loading branch information
Showing
4 changed files
with
85 additions
and
13 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// YearRange.swift | ||
// KVKCalendar | ||
// | ||
// Created by Rakuyo on 9.9.2024. | ||
// | ||
|
||
import Foundation | ||
|
||
public protocol YearRange { | ||
associatedtype Bound: Comparable | ||
|
||
/// The range's lower bound. | ||
var lowerBound: Bound { get } | ||
|
||
/// The range's upper bound. | ||
var upperBound: Bound { get } | ||
} | ||
|
||
extension Range: YearRange { } | ||
|
||
extension ClosedRange: YearRange { } |