fingerpich / jalali-moment

Display, parse, manipulate, validate and convert jalali (Persian, Khorshidi, Shamsi) or Gregorian (Miladi) dates and times.
https://fingerpich.github.io/jalali-moment/
MIT License
434 stars 68 forks source link

Convert Jalali To Gregorian #97

Closed ghkhashayar closed 4 years ago

ghkhashayar commented 4 years ago

Hi, I Write This Code: moment.from('1377/02/15', 'fa', 'YYYY/MM/DD').format('YYYY/MM/DD') And Return To Me: 1377/02/15

How I Can Convert Jalali To Gregorian?

fingerpich commented 4 years ago

Hi, Please create a demo

you may have used moment.locale('fa') so you would need to use locale('en') before the format method as the following code

moment.from('1377/02/15', 'fa', 'YYYY/MM/DD').locale('en').format('YYYY/MM/DD')
ghkhashayar commented 4 years ago

I Try it. not work. it return: 1377/02/15 I use in the vue.js and install vue-jalali-moment library.

fingerpich commented 4 years ago

Please create a demo in stackblitz demo