Friday, March 1, 2024

Time 1.0.0 Swift Package

Dave DeLong:

Four years ago I introduced Time 0.9.0. It is appropriate that today, on its first birthday, it finally graduates to 1.0.0!

[…]

All “fixed values” keep track of their calendar, locale, and time zone, enabling you to easily work with calendar values from around the world with the knowledge that their relative calculations are correct.

Beyond this, Time has numerous other capabilities, including:

  • Creating clocks in any combination of calendar, locale, or time zone
  • Creating clocks that move faster or slower than real time to facilitate testing time-dependent code
  • Adopting the RegionalClock protocol to create your own clocks for controlling time
  • Listening for time changes via a Combine publisher or AsyncSequence
  • Retrieving the Range<Instant> for any calendar value
  • Converting calendar values between time zones, locales, and calendars
  • Truncating calendar values to get their containing units
  • Finding differences between calendar values
  • Offsetting (adjusting) calendar values by specific amounts

It’s built on Foundation.

Dave DeLong:

Well, the main reason for the delay is that I was working at Apple, where it’s extremely difficult to get permission to work on open source projects. I left that job about 3 weeks ago, so the past couple of weeks have been me frantically getting the 1.0 version ready for today.

Previously:

1 Comment RSS · Twitter · Mastodon

Like surely many I recognize Dave DeLong’s name from his long tenure at Apple and supporting developers, especially last decade.

This package looks interesting, but I’m actually more interested in learning why he left Apple (again).

Leave a Comment