4 ms·
For the %G issue, I think it should be as simple as changing the %G description in the man page to "This is probably not what you want to use. See %Y. [insert c
by testplzignore 8y ago
For the %G issue, I think it should be as simple as changing the %G description in the man page to "This is probably not what you want to use. See %Y. [insert current description here]".
- TomK32 8y agoIt does, though not simple enough: _"This has the same format and value as %Y, except that if the ISO week number belongs to the previous or next year, that year is used instead."_
- Volt 8y ago> This has the same format and value as %Y "Sweet, I can stop reading here, this is what I want!" I'm sure I'll make this mistake at some point.
- deleted 8y ago[deleted]
- dkresge 8y agoWhat if man pages colorized (or greyscaled) oft-used vs. esoteric or less common options? Just having a common visual cue could both save time and reduce risk.
- repsilat 8y agoI think `tar` is a great analogy for date formatting -- "Here is a few examples, one of which is probably what you want." `tar cvzf archive_to_write.tar.gz dirname` `tar xvf archive_to_unpack.tar` Cf "%Y-%m-%d %H:%M:%S" -> "2001-01-31 23:59:61" That's a nice example. A four digit year, an hour past 12, months padded, two leap seconds. (:00 would be good for seconds too, as would 01 for the day.) Maybe a short note, then next example -- 12 hour clocks, AM/PM, string months, truncated year. Then the next example, maybe this "week-based" date format. Or maybe just leave that for the end "reference" section. Lead with two or three short examples that cover 95% of usage. It'll make the document a handful of lines longer, but it'll save these bugs and it'll save people time.