I Made Peace with Go's Date Formatting

2 nnx 1 6/18/2025, 11:47:59 PM preslav.me ↗

Comments (1)

npalli · 6h ago

  time.Now().Format("Monday, January 2, 2006 at 15:04")
  // Try on the Go Playground: https://go.dev/play/p/kOWlG6bdvbC
You can change it to time.Now.Format("Monday, January 345, 2006 at 588:46") and it will compile and run fine, printing junk. No compile or runtime checks, is there any language that is this broken in dates. Most should print some error or something right?