I’m frequently wanting to work with truncated dates in Swift apps, especially when dealing with Swift Charts. Foundation provides Calendar.startOfDay(for:) to get the first moment of a day, and that’s been really useful. The extension below will do something similar for an arbitrary1 …
Read more on my main blog