Re:Strftime's alpha-sorted man page vs. well-meaning people
by kazinator on Monday May 14, 2018 @11:04AM
(#17066141)
The compiler could help here.
It makes sense for %G to appear with %V, but not with %m and %d.
Nonsensical combinations like this can be diagnosed with a compiler warning if the strftime format is a string literal directly passed to strftime, or found to do so via data flow.
A run-time warning would be nice, but problematic.
It makes sense for %G to appear with %V, but not with %m and %d.
Nonsensical combinations like this can be diagnosed with a compiler warning if the strftime format is a string literal directly passed to strftime, or found to do so via data flow.
A run-time warning would be nice, but problematic.