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
// 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