Using angular 4 date pipe to format dates. For he-IL (Hebrew) locale I see the data format as dd.mm.yyyy instead of dd/mm/yyyy
Not sure why this discrepancy?
Using angular 4 date pipe to format dates. For he-IL (Hebrew) locale I see the data format as dd.mm.yyyy instead of dd/mm/yyyy
Not sure why this discrepancy?
I recommend using toLocaleDateString()
in your case:
var date = new Date().toLocaleDateString('he-IL');
console.log(date);
date = date.replace(/\./g, '/');
console.log(date);