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:

https://github.com/davedelong/time

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️

Adventures in Advent of Code
Conditional Compilation, Part 4: Deployment Targets
Simplifying Backwards Compatibility in Swift
Core Data and SwiftUI
Custom Property Wrappers for SwiftUI
Exploiting String Interpolation For Fun And For Profit
HTTP in Swift, Part 18: Wrapping Up
HTTP in Swift, Part 17: Brain Dump
HTTP in Swift, Part 16: Composite Loaders
HTTP in Swift, Part 15: OAuth
HTTP in Swift, Part 14: OAuth Setup
HTTP in Swift, Part 13: Basic Authentication
HTTP in Swift, Part 12: Retrying
HTTP in Swift, Part 11: Throttling
HTTP in Swift, Part 10: Cancellation
HTTP in Swift, Part 9: Resetting
HTTP in Swift, Part 8: Request Options
HTTP in Swift, Part 7: Dynamically Modifying Requests
HTTP in Swift, Part 6: Chaining Loaders
HTTP in Swift, Part 5: Testing and Mocking
HTTP in Swift, Part 4: Loading Requests
HTTP in Swift, Part 3: Request Bodies
HTTP in Swift, Part 2: Basic Structures
HTTP in Swift, Part 1: An Intro to HTTP
Anything worth doing...
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