📜 ⬆️ ⬇️

The problem of the "7th of January"

While working on one of the projects, a rather interesting bug was discovered, which, as it turned out, manifests itself not only in “self-written” calendars, but also in popular open-source libraries. The problem is the inability to choose January 7th . Some calendars simply do not have this date:
image
If you choose the 6th number (which is in place of the 7th), then the 6th number is selected.

The bug is observed (according to preliminary estimates) under Windows 8 .

UPD: The nature of the problem is disclosed here . It's all about RTZ2 after Microsoft Update KB2998527.
')
UPD2: 0xy : the problem is observed not only in Firefox, but also in mobile versions of various browsers. More (plus bug fix).

Some details under the cut.

A quick jog on the Internet showed the existence of this problem in a wide range of calendars. In most cases, the number 7 is shown, but it cannot be selected:

image

Since almost all js-calendars use Date for calculations, there is a possibility that, under certain circumstances, using the latter can lead to some problems for users on January 7th .

Most recently, a post about problems of date and time in JS appeared at Habré , where in the comments there was a discussion of the question of different behavior of Date in different browsers. And, apparently, a vivid example of one of these problems was found.

The bug was observed in Firefox (latest version, Windows 8), there is evidence that the bug was also detected under Chrome (latest version, Windows 8). We could not catch it (Windows 8 is not in the office), but the growing discontent of some customers (in our case, the hotel) indicates that there is a problem. And it seems that this is somehow related to Windows 8. On the same computer in Internet Explorer, the calendar worked fine. There is information that after upgrading to Windows 8.1, the problem is eliminated. There is very little time left before this date, so I decided to warn that someone might not get clients on January 7, but a lot of angry hemorrhoids . Forewarned is forearmed.

The nature of the problem probably lies in the fact that the browser each implements the Date object in its own way, which means time can vary from browser to browser. But here the bug is observed with reference to the system. Maybe someone from habravchan able to comment on this interesting behavior?

Source: https://habr.com/ru/post/246097/


All Articles