3 ms·
https://twitter.com/jmhodges/status/549430032616017921 https://twitter.com/jmhodges/status/549430032616017921 Also https://twitter.com/jmhodges/status/54943155
by spatulon 12y ago
https://twitter.com/jmhodges/status/549430032616017921 https://twitter.com/jmhodges/status/549430032616017921
Also https://twitter.com/jmhodges/status/549431554879938560 https://twitter.com/jmhodges/status/549431554879938560 :
"(The correct formats are "yyyy" and "%Y". Yes, this matters and is happening right now. "Week-based years" are a thing.)"
- warrenm 12y agothanks :)
- mrweasel 12y agoNot much of a source really, it's just some random dudes tweet, with no real explanation. Also it assume (correctly in most case) that %G or YYYY isn't what you where looking for. If you're going to throw something like this out on the internet, I would like it to be more detailed. Just blasting it out on Twitter is pretty useless. Reproduction: `date -u "+%G"`, sorry but that does EXACTLY what it's suppose to: [http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html http://pubs.opengroup.org/onlinepubs/009695399/functions/str...]. Depending on your operating system it's even documented. OpenBSD has a pretty good documentation for it, while Mac OS X is somewhat lacking, but to the point where you wouldn't use it without checking what it actually means.[http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/strftime.3?query=strftime&sec=3 http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/...] Why would you even pick %G if that wasn't what you meant, %Y seems more obvious. Using YYYY I can understand, it's a bit of gotcha that YYYY is one thing and yyyy is something less. It even test correctly more often than not.
- dmourati 12y ago* Random dude who worked at twitter and cited the people currently working at twitter who found and fixed the problem during the time he tweeted it.