Created
June 1, 2012 21:22
-
-
Save bensie/2855206 to your computer and use it in GitHub Desktop.
Parse iso8601 time in RubyMotion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Time | |
| def self.iso8601(time) | |
| formatter = NSDateFormatter.alloc.init | |
| formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss'Z'" | |
| formatter.dateFromString time | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment