Swift Calendar favorites

The Calendar class in Swift has so many useful helper methods to make working with dates easier, and less error prone. A couple of my absolute favorites: isDateInToday(_ date: Date) -> Bool Simple and to the point. let occursToday = Calendar . current . isDateInToday ( someDate ) isDate(_ date1: Date, inSameDayAs date2: Date) -> Bool Say you have two dates returned from a server as UNIX…