JalaliJSCalendar is a JavaScript date-picker and calendar widget based
on "Dynarch DHTML Calendar" from Mihai Bazon. The main difference
between two is that JalaliJSCalendar supports Persian (AKA Hijri
Shamsi) calendar too, which is the official Iranian calendar.
It contains convertor (jalali.js) and HTML datepicker/calendar
var date = new Date();
console.log( date.echoFa() );
console.log( date.echo() );
console.log( date );
~~> شنبه، 25 دی 1400 - 19:22:22
~~> Saturday January 15 2022 - 19:22:22
~~> Sat Jan 15 2022 19:22:22 GMT+0330 (Iran Standard Time)
<script src="https://cdn.jsdelivr.net/npm/jdate.js"></script>
<script type="text/javascript">
(function() {
var date = new Date();
console.log("Normal format: " + date.echo("Y/m/d"));
console.log("Jalali format: " + date.echoFa("Y/m/d"));
})();
</script>