#Swift coding programming プログラミング
Explore tagged Tumblr posts
m-coding · 10 years ago
Text
【swift】 Getting difference between two dates. 二つの日付の差
var timeDifference = firstDate.timeIntervalSinceDate(secondDate)
Use timeIntervalSinceDate.
This function will subtract secondDate from firstDate :D
timeIntervalSinceDateを使うと、firstDateからsecondDateを引いてくれます。
firstDateとsecondDateは自分で引きたい値をセットします;D
0 notes