Created
March 10, 2015 16:18
-
-
Save iltercengiz/13d13cb5b684762c8323 to your computer and use it in GitHub Desktop.
Date Fortmatter
This file contains 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
import Foundation | |
import UIKit | |
let date = NSDate(timeIntervalSince1970:1426003200) | |
let dateFormatter = NSDateFormatter() | |
dateFormatter.dateStyle = .MediumStyle | |
dateFormatter.stringFromDate(date) | |
dateFormatter.dateFormat = "HH:mm, d MMM yyyy" | |
dateFormatter.stringFromDate(date) | |
dateFormatter.dateFormat = "HH:mm, d MMMM yyyy" | |
dateFormatter.stringFromDate(date) | |
dateFormatter.locale = NSLocale(localeIdentifier:"tr") | |
dateFormatter.stringFromDate(date) | |
dateFormatter.locale = NSLocale(localeIdentifier:"ru") | |
dateFormatter.stringFromDate(date) | |
dateFormatter.locale = NSLocale.currentLocale() | |
dateFormatter.stringFromDate(date) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment