3 ms·
Interesting that it formats the results differently based on the input. For example, "June 12 1980" results in "6 12 80", while "1980-06-12" returns "80 06 12".
by jihadjihad 3y ago
Interesting that it formats the results differently based on the input. For example, "June 12 1980" results in "6 12 80", while "1980-06-12" returns "80 06 12". I was kind of hoping to find the "YYYYMMDD" value regardless of input, but ah well.
The link in sibling comment by brynbryn [0] is a much better (not to mention faster) implementation IMO.
0: https://news.ycombinator.com/item?id=37955434 https://news.ycombinator.com/item?id=37955434