new Date().toLocaleDateString code example
Example 1: how to get date using tolocaledatestring
const date=new Date();
const options - {weekday:'long',year:'numeric',month:'long',day:'numeric'};
let today=today.toLocaleDatestring("en-IN",options);
Example 2: toLocaleDateString() options
new Date("1983-March-25").toLocaleDateString('fr-CA', { year: 'numeric', month: '2-digit', day: '2-digit' })
'03/25/1983'