Last active
August 29, 2015 14:21
-
-
Save ivangodfather/01fa53d99a0e68329626 to your computer and use it in GitHub Desktop.
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
| let date = NSDate() | |
| let formatter = NSDateFormatter() | |
| formatter.dateFormat = NSDateFormatter.dateFormatFromTemplate("YYYY-MM-d", options: 0, locale: NSLocale(localeIdentifier: "es_ES")) | |
| let second = formatter.dateFromString(formatter.stringFromDate(date)) | |
| println("First: \(formatter.stringFromDate(date))") | |
| println("Second: \(formatter.stringFromDate(second!))") | |
| "First: 25/05/2015" | |
| "Second: 21/12/2014" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment