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

gist.github.com/glyph/ad25a9e8

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

Follow

@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.

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

@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.

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

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.