PersianDate icon indicating copy to clipboard operation
PersianDate copied to clipboard

Inconsistent Results Between dist and library

Open RafeSafari opened this issue 3 years ago • 0 comments

It may be wrong, but I think there are different results for the export in dist and the project itself. I imported project through npm and using latest version which is 1.1.0. For the client side, used the minified version in dist directory. The result for new persianDate(1742502599000).format() in client side is "۱۴۰۴-۰۱-۰۱ ۲۳:۵۹:۵۹ ب ظ". However it will be "۱۴۰۳-۱۲-۳۰ ۲۳:۵۹:۵۹ ب ظ" for the server side. Note that server is true and perhaps client did not count year 1403 as a leap year.

Another way to reproduce the problem is to use new persianDate().add('day', XXX) and increase XXX to reach the critical point of "۱۴۰۳-۱۲-۳۰"

RafeSafari avatar Feb 27 '22 10:02 RafeSafari