From: Jeff King <peff@peff.net>
To: Johan Sageryd <j416@1616.se>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Fix '--relative-date'
Date: Sat, 3 Oct 2009 06:06:15 -0400 [thread overview]
Message-ID: <20091003100615.GC17873@coredump.intra.peff.net> (raw)
In-Reply-To: <1254543618-3772-1-git-send-email-j416@1616.se>
On Sat, Oct 03, 2009 at 01:20:18PM +0900, Johan Sageryd wrote:
> This fixes '--relative-date' so that it does not give '0 year, 12
> months', for the interval 360 <= diff < 365.
Thanks. I think this was a regression introduced recently when we fixed
the rounding on how years are printed (it used to just say "1 year"
because we were close, but now we always round down, so our boundary for
"1 year" must match exactly).
I've picked up your patch in my tree with the following test squashed
in:
diff --git a/t/t0006-date.sh b/t/t0006-date.sh
index a4d8fa8..75b02af 100755
--- a/t/t0006-date.sh
+++ b/t/t0006-date.sh
@@ -24,6 +24,7 @@ check_show 13000000 '5 months ago'
check_show 37500000 '1 year, 2 months ago'
check_show 55188000 '1 year, 9 months ago'
check_show 630000000 '20 years ago'
+check_show 31449600 '12 months ago'
check_parse() {
echo "$1 -> $2" >expect
-Peff
next prev parent reply other threads:[~2009-10-03 10:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-03 4:20 [PATCH] Fix '--relative-date' Johan Sageryd
2009-10-03 10:06 ` Jeff King [this message]
2009-10-03 11:18 ` Johan Sageryd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091003100615.GC17873@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=j416@1616.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox