Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Playground - noun: a place where people can play
import UIKit
import Foundation
let timeInterval = NSDate().timeIntervalSince1970
let date = NSDate(timeIntervalSince1970: timeInterval)
let dateFormatter = NSDateFormatter()
dateFormatter.dateFormat = "MMMM"
dateFormatter.locale = NSLocale(localeIdentifier: "tr")
let turkishDateString = dateFormatter.stringFromDate(date)
dateFormatter.locale = NSLocale(localeIdentifier: "en")
let englishDateString = dateFormatter.stringFromDate(date)
dateFormatter.locale = NSLocale(localeIdentifier: "ru")
let russianDateString = dateFormatter.stringFromDate(date)
dateFormatter.locale = NSLocale(localeIdentifier: "fr")
let frenchDateString = dateFormatter.stringFromDate(date)
dateFormatter.locale = NSLocale(localeIdentifier: "es")
let spanishDateString = dateFormatter.stringFromDate(date)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment