Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Date Fortmatter
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
You can’t perform that action at this time.