You mix calendars, dates, and components:
let datenow = NSDate() // This is a point in time, independent of calendars let calendar = NSCalendar.currentCalendar() // System calendar, likely Gregorian let components = calendar.components(NSCalendarUnit(UInt.max), fromDate: datenow) // Gregorian components println("\(components.year)") // "2014" var islamic = NSCalendar(identifier:NSIslamicCivilCalendar)! // Changed the variable name // *** Note also NSCalendar(identifier:) now returns now returns an optional *** var date = islamic.dateFromComponents(components) // so you have asked to initialise the date as AH 2014 println(date) // This is a point in time again, sometime in AH 2014, or AD 2576
What you need to do is simply:
let datenow = NSDate() let islamic = NSCalendar(identifier:NSIslamicCivilCalendar)! let components = islamic.components(NSCalendarUnit(UInt.max), fromDate: datenow) println("Date in system calendar:\(datenow), in Hijri:\(components.year)-\(components.month)-\(components.day)")
To get a formatted string, and not just whole components, you need to use NSDateFormatter , which allows you to specify the calendar and date, as well as the format. See here .
Update
To simply transliterate the numbers (eastern) Arabic numbers (since 0 ... 9 are called (western) Arabic numbers to distinguish them from, say, Roman numbers), in accordance with the request, you can use:
let sWesternArabic = "\(components.day)-\(components.month)-\(components.year)" let substituteEasternArabic = ["0":"٠", "1":"١", "2":"٢", "3":"٣", "4":"٤", "5":"٥", "6":"٦", "7":"٧", "8":"٨", "9":"٩"] var sEasternArabic = "" for i in sWesternArabic { if let subs = substituteEasternArabic[String(i)] {