Can anyone help me to change Gregorian date to Persian in JavaScript? I want to use it in HTML and JavaScript.
You can use toLocaleDateString();
toLocaleDateString();
let today = new Date().toLocaleDateString('fa-IR'); console.log(today);
fa-IR is for Farsi-Iran,
fa-IR
other's like bellow:
en-US: For English
en-US
hi-IN: For Hindi
hi-IN
...