glyph,
@glyph@mastodon.social avatar

OK so I wrote these two functions (and I did not even unit test them, so they're probably wrong):

https://gist.github.com/glyph/ad25a9e8d93bb9f7ac15a947cbf53a5d

There must be a better way to do this with the standard library, right? Something buried in datetime somewhere?

pganssle,
@pganssle@qoto.org avatar

@glyph Needs a deprecation warning. Not that you can actually deprecate the use of 12 hour clocks by fiat in a random library, but it’s worth a shot.

glyph,
@glyph@mastodon.social avatar

@pganssle this is in an application, like, for humans to use

pganssle,
@pganssle@qoto.org avatar

@glyph No I don’t mean you should deprecate the function. I think we, as a society, should heap approbation and disdain on humans who use 12 hour clocks. 12 hour clocks are ridiculous.

glyph,
@glyph@mastodon.social avatar

@pganssle if I could be my ideal self I would express everything as swatch .beats, but unfortunately I do sometimes think it is 3PM

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