malcommac / SwiftDate

🐔 Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.
MIT License
7.64k stars 770 forks source link

Fixing issue #717 - Get the total second from mm:ss format #781

Open spneshaei opened 3 years ago

spneshaei commented 3 years ago

Fixing issue #717 - Now one can use .totalSeconds property on Date to get the total number of seconds from the provided time, assuming the hour, minute, and second fields are properly initialized.

As an example, calling .totalSeconds on 4:23:11 will return 15791.