Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2021-2025 Stephen F. Booth <me@sbooth.org>
Copyright (c) 2021-2026 Stephen F. Booth <me@sbooth.org>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
21 changes: 21 additions & 0 deletions LICENSES/MIT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 6 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// swift-tools-version: 5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.
//
// SPDX-FileCopyrightText: 2023 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
//

import PackageDescription

Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/ArmenianCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The Armenian calendar is a solar calendar with 365 days in the year.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/AstronomicalCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// A hybrid calendar that uses the Julian calendar for dates on or before October 4, 1582 and the Gregorian calendar for dates on or after October 15, 1582.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/BahaiCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The Baháʼí calendar is a solar calendar with 365 days in the year plus an additional leap day in certain years.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/Calendar+JulianDate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

import Foundation
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/Calendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// A calendar measuring time using years, months, and days.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/CalendarProtocol.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// A calendar that supports Julian day number to date conversion.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/CopticCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The Coptic calendar is a solar calendar with 365 days in the year plus an additional leap day every fourth year.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/Date+JD.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2024 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

import Foundation
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/EgyptianCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The Egyptian calendar is a solar calendar with 365 days in the year.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/EthiopianCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The Ethiopian calendar is a solar calendar with 365 days in the year plus an additional leap day every fourth year.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/FrenchRepublicanCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The modified French Republican calendar is an astronomical calendar with 365 days in the year plus an additional leap day in certain years.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/GregorianCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The Gregorian calendar is a solar calendar with 365 days in the year plus an additional leap day in certain years.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/HebrewCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The Hebrew calendar is a lunisolar calendar with either 353, 354, 355, 383, 384, or 385 days in the year.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/ISOCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The ISO week-numbering calendar.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/IslamicCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The Islamic calendar is a lunar calendar with 354 days in the year plus an additional leap day in certain years.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/JDNConverter.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// Possible values for a temporal translation.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/JDNGregorianConverter.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// A converter implementing algorithms for interconverting a Julian day number and a year, month, and day in calendars using Gregorian-type intercalating.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/JDNSakaConverter.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// A converter implementing algorithms for interconverting a Julian day number and a year, month, and day in the Śaka calendar.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/JulianCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The Julian calendar is a solar calendar with 365 days in the year plus an additional leap day every fourth year.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/JulianDayNumberConverting.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// A Julian day number.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/KhwarizmianCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The Khwarizmian calendar is a solar calendar with 365 days in the year.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/MacedonianCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The Macedonian calendar is a solar calendar with 365 days in the year plus an additional leap day every fourth year.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/MayaCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The Maya calendar.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/PersianCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The Persian calendar is a solar calendar with 365 days in the year.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/SakaCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The Śaka calendar is a solar calendar with 365 days in the year plus an additional leap day in certain years.
Expand Down
5 changes: 3 additions & 2 deletions Sources/JulianDayNumber/SyrianCalendar.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

/// The Syrian calendar is a solar calendar with 365 days in the year plus an additional leap day every fourth year.
Expand Down
5 changes: 3 additions & 2 deletions Tests/JulianDayNumberTests/ArmenianCalendarTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

import Testing
Expand Down
5 changes: 3 additions & 2 deletions Tests/JulianDayNumberTests/AstronomicalCalendarTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

import Testing
Expand Down
5 changes: 3 additions & 2 deletions Tests/JulianDayNumberTests/BahaiCalendarTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

import Testing
Expand Down
5 changes: 3 additions & 2 deletions Tests/JulianDayNumberTests/CongruenceTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

import Testing
Expand Down
5 changes: 3 additions & 2 deletions Tests/JulianDayNumberTests/CopticCalendarTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

import Testing
Expand Down
5 changes: 3 additions & 2 deletions Tests/JulianDayNumberTests/Date+JDTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Copyright © 2021-2025 Stephen F. Booth <me@sbooth.org>
// SPDX-FileCopyrightText: 2021 Stephen F. Booth <contact@sbooth.dev>
// SPDX-License-Identifier: MIT
//
// Part of https://github.com/sbooth/JulianDayNumber
// MIT license
//

import Testing
Expand Down
Loading