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

Bug with TimeAgo #306

Closed
BrentMifsud opened this issue Jul 9, 2021 · 1 comment
Closed

Bug with TimeAgo #306

BrentMifsud opened this issue Jul 9, 2021 · 1 comment

Comments

@BrentMifsud
Copy link

Test Case:

let oldEpoch = 1625693136.000 // Jul 7, 2021 5:25 PM
let currentEpoch = 1625862719.98203 // Jul 9, 2021 4:31 PM

let oldDate = Date(timeIntervalSince1970: oldEpoch)
let newDate = Date(timeIntervalSince1970: currentEpoch)

print(oldDate.timeAgo(since: newDate)) // prints 23 hours

am I losing my mind? Shouldn't it be 1 day 23 hours?

@BrentMifsud BrentMifsud changed the title Bug with TimeAgoSinceNow Bug with TimeAgo Jul 9, 2021
@BrentMifsud
Copy link
Author

closing this. Duplicate of: #243

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