tablesorter icon indicating copy to clipboard operation
tablesorter copied to clipboard

Bug in parser-date-two-digit-year.js

Open xanatos opened this issue 5 years ago • 1 comments

There is a bug in parser-date-two-digit-year.js . The date 28/02/00 is first interpreted as 29/02/1900 and then it is "moved" to 28/02/2000. And it is correct. But there is a problem: the date 29/02/00 is interpreted as 29/02/1900 that is an illegal date (1900 wasn't a leap year, while 2000 is a leap year). new Date() will be invalid at this point. The correct way is probably to first extract the year (00), parseInt it, compare it with the moving range and if necessary change it.

xanatos avatar Apr 27 '20 08:04 xanatos

Hi @xanatos!

Thanks for reporting this problem! I don't know when I'll be able to work on fixing this bug, but I'll add it to my to-do list.

Mottie avatar Apr 28 '20 12:04 Mottie