I am using Intl
package and try to format dates per locales.
For ar-AE example, it formats date using arabic characters but I want to print it using numeric value.
ops = {
month: 'long',
day : 'numeric',
year : 'numeric'
};
console.log(new Intl.DateTimeFormat('ar-AE', ops).format(date));
It prints ٢ يناير، ٢٠١٧
but I want something like 2017/01/02
or "الاثنين، 2 يناير، 2017",
Is this possible?
One more question - Is that possible to format using custom pattern? If I have a localized pattern, can I use the pattern and format the date?