Type Safely

Type Safely

Custom Time Interval Strings With DateComponentsFormatter

Daily Coding Tip 087

Millie Sturgeon's avatar
Millie Sturgeon
May 24, 2022
∙ Paid
Image by JonathanRieder from Pixabay

Yesterday’s Daily Coding Tip had a basic version of a countdown timer to WWDC 2022. There wasn’t time there to look at the formatter that was displaying the remaining time. I wanted to change that code to allow the user to enable or disable any of the units, select the style used by the formatter, and select the numbe…

User's avatar

Continue reading this post for free, courtesy of Type Safely.

Or purchase a paid subscription.
© 2026 Type Safely · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture