-
-
Notifications
You must be signed in to change notification settings - Fork 769
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
toRelativeString error on Phone #15
Comments
Having the same issue. The "toRelativeString" method works fine on the simulator but fails on my actual device. (iPhone 6, iOS 8) Instead of the nicely formatted "1h" or "37s", I get back what looks like scientific notation. "9.223372+18w" |
Thank you for your report. Seems to be an issue related to deprecated 'week' property of the NSDateComponent class. I've just made a commit here and tested with iOS 8.3 63bffa8. Can you make another check with your device? |
You bet. Tested the latest commit on my device and it's working perfectly. Nailed it! |
Great :) Again, thank you for your bug report |
Great! Thank you! |
Hello there,
This code seems to work fine on the simulator, but on my phone I get an error
cell.ageLabel.text = object.published_at.toRelativeString(fromDate: NSDate(), abbreviated: true, maxUnits: 1)
println("object published \(object.published_at) age label \(cell.ageLabel.text) and date \(NSDate())")
outputs on phone
object published 2015-06-11 15:34:56 +0000 age label Optional("9.223372e+18w") and date 2015-06-13 22:29:15 +0000
outputs on simulator
object published 2015-06-11 15:34:56 +0000 age label Optional("2 days ago") and date 2015-06-13 22:41:17 +0000
Any tips?
The text was updated successfully, but these errors were encountered: