| 31 May 2024 |
Lily Foster | is there a lix off-topic so i'm not just spamming the dev channel with this? | 15:50:31 |
Lily Foster | seems not. oh well | 15:50:55 |
Lily Foster | i'm never trusting github with date/time code ever again, this library is actually awful regardless of this bug | 15:51:27 |
toinux | In reply to @lily:lily.flowers is there a lix off-topic so i'm not just spamming the dev channel with this? lets go spam the issue on the lib's github-page 🤣 | 15:53:27 |
Lily Foster | i will once i confirm cause and solution | 15:53:38 |
Lily Foster | but i at least have a failing test when comparing -P1M relative to 2023-03-29 that i'm poking against | 15:54:17 |
Qyriad | Coming soon to a Lix near you; before: | 16:24:33 |
Qyriad |  Download Screenshot 2024-05-31 at 10.23.22.png | 16:24:33 |
Qyriad | After: | 16:24:41 |
Qyriad |  Download Screenshot 2024-05-31 at 10.23.33.png | 16:24:42 |
toinux | so you're printing arguments passed to functins in errors ? | 16:26:12 |
Qyriad | yep | 16:26:53 |
toinux | https://tenor.com/br5Y2.gif | 16:27:08 |
Qyriad | so that you can track the actual flow of data easier | 16:27:09 |
Qyriad | Or actually, here's a more representative example: | 16:34:49 |
Qyriad |  Download Screenshot 2024-05-31 at 10.34.27.png | 16:34:49 |
Qyriad | If you forgot to make the filter lambda take two arguments, it's now way easier to spot in the trace since 'set' arg is '<lambda @ strings>' is definitely not a set | 16:36:13 |
Lily Foster | In reply to @toinux_net:matrix.org lets go spam the issue on the lib's github-page 🤣 okay what if i said. that this library needs to be burned down to fix this. because there is too much awful handling of like,,,, everything | 18:23:31 |
strawberry🍓 (it/pup/she/they) 🏳️⚧️ 💜 🦴 (puppygock.gay) | average npm ecosystem | 18:29:46 |
| Pyrox [It/She/They] changed their display name from Pyrox [It/She/They] to Pyrox [Fox/It/She/They]. | 18:30:00 |
| Pyrox [It/She/They] changed their display name from Pyrox [Fox/It/She/They] to Pyrox [It/She/They]. | 18:30:08 |
Lily Foster | so although the 30 days thing causes surprising behavior elsewhere, this exact behavior is caused by this JavaScript special:
[I] lily@bina ~> , node
Welcome to Node.js v22.2.0.
Type ".help" for more information.
> let date = new Date()
undefined
> date
2024-05-31T18:32:29.029Z
> date.getMonth()
4
> date.setMonth(3)
1714588349029
> date.getMonth()
4
> date
2024-05-01T18:32:29.029Z
>
notably, GitHub's library throws out that intermediate date and just uses the getMonth diff (which is 0, despite the setMonth call). and since the month diff is 0 and technically the getDate diff is more than 27, it just sets everything to zero
| 18:35:33 |
Lily Foster | so this occurs specifically on days where the current day of the month is not a valid date in the previous month. and this is why something two months ago might say one month as well. or three months ago say two months | 18:37:37 |
Lily Foster | i think the funniest thing in this though | 18:42:14 |
Lily Foster | is that they have test cases | 18:42:18 |
Lily Foster | for some of this sus behavior | 18:43:39 |
| a-kenji joined the room. | 19:07:04 |
jade_ | niko ⚡️: you can submit https://gerrit.lix.systems/c/lix/+/1157/3 | 20:23:57 |
Lily Foster | i've fixed this JS code, against my better judgement.......... https://github.com/github/relative-time-element/pull/285 | 21:07:06 |
Lily Foster | i'm going to go not touch a computer for the rest of the evening now, and maybe rest of the weekend 🫠 | 21:07:24 |