how can I get current solar year local fa (not full date) in react?
I just need to get solar year (jalali) and I'm using this:
new Date().toLocaleDateString('fa-IR');
but it return current date (24/04/1399). I just want (1399)
how can I get current solar year local fa (not full date) in react?
I just need to get solar year (jalali) and I'm using this:
new Date().toLocaleDateString('fa-IR');
but it return current date (24/04/1399). I just want (1399)
You can pass additional options, and transform output as you want