title: How to convert arabic date to english date
body: <p>I have a problem in my application. I am getting a date in this format :</p>
  
  <p><code>"الإثنين 2015.5.5 - 16:16 مساء  بتوقيت ابوظبي"</code></p>
  
  <p><strong>Like this below Image-</strong></p>
  
  <p><img src="https://i.stack.imgur.com/AvToA.png" alt="Screenshot"></p>
  
  <p>From an API but I want to convert it to the <code>NSDate</code> English format.</p>
  
  <p>I found this code by <em>@dfri</em>. It converts from English to Arabic but I don't know my API <code>dateFormat</code>.</p>
  
  <pre><code>// input date in given format (as string)
  let inputDateAsString = "2016-03-09 10:33:59"
  
  // initialize formatter and set input date format
  var formatter = NSDateFormatter()
  formatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
  
  // read input date string as NSDate instance
  if let date = formatter.dateFromString(inputDateAsString) {
  
      // set locale to "ar_DZ" and format as per your specifications
      formatter.locale = NSLocale(localeIdentifier: "ar_DZ")
      formatter.dateFormat = "EEEE, d, MMMM, yyyy HH:mm a"
      let outputDate = formatter.stringFromDate(date)
  
      print(outputDate) // الأربعاء, 9 مارس, 2016 10:33 ص
  }
  </code></pre>
  
  <p>How can I do this?</p>