ref: e78c3d8bde54483321956a5bffee03dff46aefc2
parent: 0d444d9f15e1d0ca9630d49c5b7e1f64c84cabce
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Oct 29 14:19:47 EDT 2022
tmdate: provide better parse errors it's often not obvious what date component caused an error when eyeballing a date format string and date; make the error message contain this information.
--- a/sys/src/libc/port/date.c
+++ b/sys/src/libc/port/date.c
@@ -985,7 +985,7 @@
tmtimens(tm, abs, tm->nsec, tz);
return tm;
baddate:
- werrstr("invalid date %s", str);
+ werrstr("invalid %c component in '%s'", c0, str);
return nil;
badfmt:
werrstr("garbled format %s near '%s'", fmt, p);
--
⑨