jalali-moment icon indicating copy to clipboard operation
jalali-moment copied to clipboard

jalali diff not working on different server & client timezone

Open aminmokhtari94 opened this issue 4 years ago • 2 comments

Bug demo: https://stackblitz.com/edit/jalali-moment-demo-react-cvdbk4?file=index.js

Describe:

  • Day diff function wont work if on geo timezone days was same but on jalali not!
  • Passing 'jDay', 'jMonth', etc. to diff second arg not working

Expected:

  • Return jalali days difference by passing 'jDay'
  • Add timezone change function like original: https://momentjs.com/timezone/docs/#/using-timezones/parsing-in-zone/
  • And Update vue-jalali-moment jalali dependency

aminmokhtari94 avatar Sep 05 '20 21:09 aminmokhtari94

Actually i didn't get what you mean I think diff('jday') is equal to diff('day'), isn't it? and in demo I see a&b days diff = 16 - 16 = 0 is it wrong or what? can you please describe more?

fingerpich avatar Jan 17 '21 09:01 fingerpich

Can you please take a look at the following PR https://github.com/fingerpich/jalali-moment/pull/96/commits/ce87bc4c01b6028c3952b029208054b478196439

fingerpich avatar Jan 17 '21 10:01 fingerpich