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
435 stars 68 forks source link

Validation problem #61

Closed ehsan69h closed 4 years ago

ehsan69h commented 5 years ago

I tested 1398-02-30 and it is invalid in demo page or jalali-angular-datepicker component.

fingerpich commented 5 years ago

Thanks Please create a PR if you can fix the problem.

pouyamiralayi commented 5 years ago

Hi! is there any update regarding this issue and especially this one? this is odd because in the demo this is working correct!(based on last day of SHAHRIVAR) thanks.

fingerpich commented 5 years ago

But it doesn't work correctly even in the demo. Have you tried ..../02/30 and ..../06/31?

pouyamiralayi commented 5 years ago

Hi @fingerpich ! i just tested 31/6/1398 and it showed me 2019/09/22 which is ok to me. i think we must compensate the gap by adding some to minutes or hours i guess. for instance my use case was only date with times set to 00:00:00 i think i have to add to hours and minutes some value to fill in the gaps. but i am not sure the exact amount of hours! is this because of the daylight saving nature of iran utc? thanks.

fingerpich commented 4 years ago

the demo has fixed. PR

fingerpich commented 4 years ago

Hi @fingerpich ! i just tested 31/6/1398 and it showed me 2019/09/22 which is ok to me. i think we must compensate the gap by adding some to minutes or hours i guess. for instance my use case was only date with times set to 00:00:00 i think i have to add to hours and minutes some value to fill in the gaps. but i am not sure the exact amount of hours! is this because of the daylight saving nature of iran utc? thanks.

please check the #93