Pro@programming.dev to Programming@programming.devEnglish · 17 hours agoCursed knowledge we have learned as a result of building Immich that we wish we never knew.immich.appexternal-linkmessage-square28fedilinkarrow-up184arrow-down11
arrow-up183arrow-down1external-linkCursed knowledge we have learned as a result of building Immich that we wish we never knew.immich.appPro@programming.dev to Programming@programming.devEnglish · 17 hours agomessage-square28fedilink
minus-squareDaGeek247@fedia.iolinkfedilinkarrow-up32·12 hours ago JavaScript Date objects are cursed JavaScript date objects are 1 indexed for years and days, but 0 indexed for months. Oh that’s not nearly the only thing javascript fucks up about their Date() implementation. https://jsdate.wtf/
minus-squaremuzzle@lemmy.ziplinkfedilinkarrow-up1·2 hours agoSee also: https://www.destroyallsoftware.com/talks/wat
minus-squarejohn_lemmy@slrpnk.netlinkfedilinkarrow-up8·7 hours agoI … this seems like a std library made to troll you. Is there a (good) reason it is like that?
minus-squareKevin@programming.devlinkfedilinkarrow-up1·2 hours agoI can only imagine it wasn’t planned properly, cuz that’s so many quiet behaviours without good parsing errors
Oh that’s not nearly the only thing javascript fucks up about their Date() implementation. https://jsdate.wtf/
See also: https://www.destroyallsoftware.com/talks/wat
I … this seems like a std library made to troll you. Is there a (good) reason it is like that?
No.
I can only imagine it wasn’t planned properly, cuz that’s so many quiet behaviours without good parsing errors