matrix-public-archive/shared
Eric Eastwood f9e16964e1
Fix off-by-one calendar months with time zones that are greater than UTC+0 (#86)
Fix off-by-one calendar months with time zones that are greater than UTC+0 (GMT+0).

Fix https://github.com/matrix-org/matrix-public-archive/issues/77

Previously, we would calculate `lastDayOfTheMonthDate` in the local timezone because we were using the vanilla `new Date(year, month, 0)` constructor. For any timezone greater than `UTC+0` (like London UTC+1 or Korea UTC +9), this means that the date is a day-behind when we go back to UTC+0.

**Before:**

```
inputDate Fri, 29 Jul 2022 00:00:00 GMT 1659052800000
lastDayOfTheMonthDate Sat, 30 Jul 2022 23:00:00 GMT 1659222000000
lastDayOfTheMonth 30
```

**After**

```
inputDate Fri, 29 Jul 2022 00:00:00 GMT 1659052800000
lastDayOfTheMonthDate Sun, 31 Jul 2022 00:00:00 GMT 1659225600000
lastDayOfTheMonth 31
```
2022-10-18 18:36:13 -05:00
..
lib Show surrounding messages for a full screen of content (#71) 2022-09-20 16:02:09 -05:00
viewmodels Show surrounding messages for a full screen of content (#71) 2022-09-20 16:02:09 -05:00
views Fix off-by-one calendar months with time zones that are greater than UTC+0 (#86) 2022-10-18 18:36:13 -05:00
.eslintrc.json Stop restarting server when the client bundle updates 2022-02-15 17:30:30 -06:00
hydrogen-vm-render-script.js Show surrounding messages for a full screen of content (#71) 2022-09-20 16:02:09 -05:00
room-directory-vm-render-script.js Add search to room directory landing page (#70) 2022-09-15 20:41:55 -05:00