matrix-public-archive/shared/views
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
..
ArchiveRoomView.js Show surrounding messages for a full screen of content (#71) 2022-09-20 16:02:09 -05:00
CalendarView.js Fix off-by-one calendar months with time zones that are greater than UTC+0 (#86) 2022-10-18 18:36:13 -05:00
DeveloperOptionsView.js Show surrounding messages for a full screen of content (#71) 2022-09-20 16:02:09 -05:00
MatrixLogoView.js Room directory landing page v1 (#61) 2022-09-08 01:30:04 -05:00
NotEnoughEventsFromDaySummaryTileView.js Add linting to CI (#74) 2022-09-27 22:21:00 -05:00
RightPanelContentView.js Show surrounding messages for a full screen of content (#71) 2022-09-20 16:02:09 -05:00
RoomCardView.js Add linting to CI (#74) 2022-09-27 22:21:00 -05:00
RoomDirectoryView.js Add search to room directory landing page (#70) 2022-09-15 20:41:55 -05:00