Categories: iOS

The Bot is an App

img_1639

Screen capture from the iOS app version of the Timebot.

Getting the difference between two dates in Swift on iOS is a billion times easier than it is in basic JavaScript. One line of code.

let diffComp = Calendar.current.dateComponents([.year, .month, .day], from: date2, to: date1)

 

Article info