ndw,
@ndw@mastodon.social avatar

Today in What The Actual Fantasy, JavaScript edition, I'm reminded that the JavaScript constructor "new Date(2024, 4, 10)" returns May 10, 2024 because the month (and only the month!) is zero indexed.

mathling,
@mathling@mastodon.social avatar

@ndw 🤦‍♀️

RogerBW,
@RogerBW@emacs.ch avatar

@ndw Let me guess, they're copying the convention from libc's tm? (Perl does a similar thing.)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • ngwrru68w68
  • tester
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • tacticalgear
  • JUstTest
  • osvaldo12
  • normalnudes
  • cubers
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • Leos
  • provamag3
  • anitta
  • modclub
  • megavids
  • lostlight
  • All magazines