David Karr
unread,Jun 9, 2025, 2:59:44 PMJun 9Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
I've used "time.Parse()" several times in various small applications, and today I realized a curious inflexibility with it. If I have to parse date values where the months or days could be either 1 or 2 digits, which is all cases if the code might be dealing with dates anywhere in the year, then I have no choice but to implement a "normalize" function that adds a "0" at the start if the value is not two digits. I got this to work, but anyone who uses this method would have to write the same code. It seems odd that this wouldn't be handled automatically.