We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 768fe43 commit f5ad669Copy full SHA for f5ad669
MainWidget/Widget/CountDown.swift
@@ -18,7 +18,13 @@ extension Date {
18
let nowTimeStamp = Int(now.timeIntervalSince1970)
19
let toDateTimeStamp = Int(toDate.timeIntervalSince1970)
20
let difference:Double = Double(abs(nowTimeStamp - toDateTimeStamp))
21
- return Int(floor( difference / (86400))) + 1
+ if(nowTimeStamp < toDateTimeStamp){
22
+ return Int(floor( difference / (86400))) + 1
23
+ }
24
+ else{
25
+ return Int(floor( difference / (86400)))
26
27
+
28
}
29
func dateToString(_ date:Date,dateFormat:String = "yyyy-MM-dd HH:mm:ss") -> String {
30
let formatter = DateFormatter()
Release/iWidget 1.0.ipa
2.75 MB
0 commit comments