I want the date to be formatted in the following format:
date: 2016-12-04 into الأحد، 4 ديسمبر، 2016
But I'm getting the following. The numbers are converted to Arabic numerals. I want the date and year in English numerals:
الأحد، ٤ ديسمبر، ٢٠١٦
I have used the following code to format the date to Arabic.
var date = new Date('2016-12-04');
options = {
weekday: 'long',
year: 'numeric',
month: 'short',
day: 'numeric',
};
var dateString = date.toLocaleDateString('ar-SA', options);
alert(dateString);