Indeed - for this function i needed to get the first and last date of each month, I now specified 10:00 and then i hopefully will be good, but will make it a bit more robust.
Indeed i used something similar, but wanted to check the output (as i need to calculate the date to another number) and found this difference, which was basically self-inflicted I guess
Ah sorry, quite - you are already using just date. Weird how JS adds a time to a date - other languages don't do that, instead they have a "pure" date type as opposed to a datetime type or just a time type.
JS date handling and processing is a known problem drenched in history and ...
Hopefully it won't be too much longer when we can switch to temporal (and get rid of (or at least reduce the need for) all the other libs like moment!)
What makes a polyfill different from the techniques we have already, like a shim, is this: if you removed the polyfill script, your code would continue to work, without any changes required in spite of the polyfill being removed.