diff options
author | Linus Torvalds <torvalds@osdl.org> | 2005-11-17 12:36:30 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-17 22:34:50 -0800 |
commit | 6b7b0427728fe31ee2d9375a36f1c27974432979 (patch) | |
tree | 4f8b4f1c79fcf1cf4c57b05c74e19acb05cc2e88 /init-db.c | |
parent | Make git-pack-redundant non-horribly slow on large sets of packs (diff) | |
download | tgif-6b7b0427728fe31ee2d9375a36f1c27974432979.tar.xz |
Teach "approxidate" about weekday syntax
This allows people to use syntax like "last thursday" for the approxidate.
(Or, indeed, more complex "three thursdays ago", but I suspect that would
be pretty unusual).
NOTE! The parsing is strictly sequential, so if you do
"one day before last thursday"
it will _not_ do what you think it does. It will take the current time,
subtract one day, and then go back to the thursday before that. So to get
what you want, you'd have to write it the other way around:
"last thursday and one day before"
which is insane (it's usually the same as "last wednesday" _except_ if
today is Thursday, in which case "last wednesday" is yesterday, and "last
thursday and one day before" is eight days ago).
Similarly,
"last thursday one month ago"
will first go back to last thursday, and then go back one month from
there, not the other way around.
I doubt anybody would ever use insane dates like that, but I thought I'd
point out that the approxidate parsing is not exactly "standard English".
Side note 2: if you want to avoid spaces (because of quoting issues), you
can use any non-alphanumberic character instead. So
git log --since=2.days.ago
works without any quotes.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'init-db.c')
0 files changed, 0 insertions, 0 deletions