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

Missing "toISO8601String" methods in NSDate #149

Closed
TadeasKriz opened this issue Jan 31, 2016 · 2 comments
Closed

Missing "toISO8601String" methods in NSDate #149

TadeasKriz opened this issue Jan 31, 2016 · 2 comments

Comments

@TadeasKriz
Copy link

Documentation says that the method should be available in both DateInRegion and NSDate, but I could not find it. Is it a bug in documentation or a missing method? Thanks.

@Hout
Copy link
Contributor

Hout commented Jan 31, 2016

Thanks for the issue.

.toISO8601String is replaced by .toString(DateFormat.ISO8601)

Unfortunately the string functions have not been fully documented yet and should be added to the upgrade guide. Apologies for the time wasted, but Daniele and I decided to publish the v3 library before fully completing the docs as v2 urgently needed an upgrade.

This should work for both:

let dateStr1 = DateInRegion().toString(format: DateFormat.ISO8601)
let dateStr2 = NSDate().toString(format: DateFormat.ISO8601) 

Please let us know whether or not this works for you.

@TadeasKriz
Copy link
Author

That works well, thanks!

@Hout Hout closed this as completed Jan 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants