These Xcode playgrounds contain all the code in the articles Date and Time Calculations in Swift, Part 1 and Date and Time Calculations in Swift, Part 2.
The playgrounds are:
- date-time-calculations-swift-1.playground: Companion playground for part 1.
- date-time-calculations-swift-2.playground: Companion playground for part 2.
All you need to run these playgrounds is Xcode. These were built in Xcode 15.1.
For maximum readability, open the Editor menu in Xcode and select Show Rendered Markup.