Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare with date.compare(.isEarlier(than: )) return true if two day's timeIntervalSince1970 are equal #118

Closed
alfredcc opened this issue Jul 28, 2022 · 3 comments

Comments

@alfredcc
Copy link
Contributor

https://github.com/melvitax/DateHelper/blob/master/Sources/DateHelper/DateHelper.swift#L261-L264

let date = Date.now
print(date.compare(.isEarlier(than: date))) // true
@alfredcc
Copy link
Contributor Author

just compare timeIntervalSince1970 can fix this

@alfredcc
Copy link
Contributor Author

#119

@alfredcc
Copy link
Contributor Author

alfredcc commented Jul 28, 2022

would you mind not using self.xxx ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant