git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* approxidate parsing for bad time units
@ 2012-09-06 16:24 Jeffrey Middleton
  2012-09-06 20:36 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Jeffrey Middleton @ 2012-09-06 16:24 UTC (permalink / raw)
  To: git

In telling someone what date formats git accepts, and how to verify it
understands, I noticed this weirdness:

$ export TEST_DATE_NOW=`date -u +%s --date='September 10'`;
./test-date approxidate now; for i in `seq 1 10`; do ./test-date
approxidate "$i frobbles ago"; done
now -> 2012-09-10 00:00:00 +0000
1 frobbles ago -> 2012-09-02 00:00:00 +0000
2 frobbles ago -> 2012-09-03 00:00:00 +0000
3 frobbles ago -> 2012-09-04 00:00:00 +0000
4 frobbles ago -> 2012-09-05 00:00:00 +0000
5 frobbles ago -> 2012-09-06 00:00:00 +0000
6 frobbles ago -> 2012-09-07 00:00:00 +0000
7 frobbles ago -> 2012-09-08 00:00:00 +0000
8 frobbles ago -> 2012-09-09 00:00:00 +0000
9 frobbles ago -> 2012-09-10 00:00:00 +0000
10 frobbles ago -> 2012-09-11 00:00:00 +0000

Which gets more concerning once you realize the same thing happens no
matter what fake unit of time you use... including things like "yaers"
and "moths". Perhaps approxidate could be a little stricter?

Thanks,
Jeffrey

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-10 21:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-06 16:24 approxidate parsing for bad time units Jeffrey Middleton
2012-09-06 20:36 ` Junio C Hamano
2012-09-06 21:01   ` Jeffrey Middleton
2012-09-07 13:54     ` Jeff King
2012-09-10 21:07       ` Jeffrey Middleton
2012-09-10 21:19         ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).