Introducing Time

Four years ago I blogged about the oddities of leap days.

Another Leap Day is now upon us (well, most of us anyway) so I thought it’d be a good time to reveal a project I’ve been working on for the last two and a half years.

Time, a new Swift Package

For the past couple of years, I’ve been slowly working on a Swift package called Time (primarily under the moniker of “Chronology”). A couple of months ago I realized that we’d be having a Leap Day soon, and that would be the perfect day to release its initial version to the world.

Time is a Swift package to make date and time calculations much easier. As Apple platform developers we’ve been blessed to have the raw power of the Foundation APIs available to us. These are, arguably, some of the most powerful calendaring APIs out there.

However, they have a myriad of sharp edges the frequently trip up developers. Time is my attempt to solve those problems. I won’t go in to detail here about what those problems are; for that I’ll encourage you to check out the Time repository on github:

This project is the culmination of a decade of getting way too deep into date and time code and thinking about how to “properly” solve it. I hope you’ll check out the repository, and I especially hope it makes your life easier.

Related️️ Posts️

Conditional Compilation, Part 3: App Extensions
Conditional Compilation, Part 2: Including and Excluding Source Files
Conditional Compilation, Part 1: Precise Feature Flags
Swift Protocols Wishlist