Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Custom Time Interval Strings With DateComponentsFormatter

Custom Time Interval Strings With DateComponentsFormatter

Daily Coding Tip 087

Millie Sturgeon's avatar
Millie Sturgeon
May 24, 2022
∙ Paid

Share this post

Type Safely
Type Safely
Custom Time Interval Strings With DateComponentsFormatter
Share
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…

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share