# Teach "approxidate" about weekday syntax

26 messages from 2005-11-17 to 2005-11-20. Participants: Linus Torvalds, Nicolas Pitre, Johannes Schindelin, Junio C Hamano, H. Peter Anvin, Martin Langhoff, David Roundy, Randy.Dunlap, Andreas Ericsson, Randal L. Schwartz, Matthias Urlichs.
Thread: https://gitlist.dev/t/2577

## Linus Torvalds, 2005-11-17 20:36

Subject: Teach "approxidate" about weekday syntax
Message-ID: <Pine.LNX.4.64.0511171223110.13959@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0511171223110.13959%40g5.osdl.org

```

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>
---
diff --git a/date.c b/date.c
index 73c063b..d2a67cc 100644
--- a/date.c
+++ b/date.c
@@ -34,7 +34,7 @@ static const char *month_names[] = {
 };
 
 static const char *weekday_names[] = {
-	"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
+	"Sundays", "Mondays", "Tuesdays", "Wednesdays", "Thursdays", "Fridays", "Saturdays"
 };
 
 /*
@@ -531,6 +531,22 @@ static const char *approxidate_alpha(con
 		tl++;
 	}
 
+	for (i = 0; i < 7; i++) {
+		int match = match_string(date, weekday_names[i]);
+		if (match >= 3) {
+			int diff, n = *num -1;
+			*num = 0;
+
+			diff = tm->tm_wday - i;
+			if (diff <= 0)
+				n++;
+			diff += 7*n;
+
+			update_tm(tm, diff * 24 * 60 * 60);
+			return end;
+		}
+	}
+
 	if (match_string(date, "months") >= 5) {
 		int n = tm->tm_mon - *num;
 		*num = 0;

```

## Nicolas Pitre, 2005-11-17 21:27

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <Pine.LNX.4.64.0511171622450.14287@localhost.localdomain>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0511171622450.14287%40localhost.localdomain
In-Reply-To: <Pine.LNX.4.64.0511171223110.13959@g5.osdl.org>

```
On Thu, 17 Nov 2005, Linus Torvalds wrote:

> 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.

Maybe if you applied the different time units in decreasing size that 
would do the trick?  e.g. months have precedence over weeks, weeks over 
weekdays, weekdays over days, etc.


Nicolas

```

## Johannes Schindelin, 2005-11-17 21:44

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <Pine.LNX.4.63.0511172242390.18285@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0511172242390.18285%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <Pine.LNX.4.64.0511171622450.14287@localhost.localdomain>

```
Hi,

On Thu, 17 Nov 2005, Nicolas Pitre wrote:

> On Thu, 17 Nov 2005, Linus Torvalds wrote:
> 
> > 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.
> 
> Maybe if you applied the different time units in decreasing size that 
> would do the trick?  e.g. months have precedence over weeks, weeks over 
> weekdays, weekdays over days, etc.

Or even better: make it relative until you find an absolute reference. 
I.e. "one day" will be 1 * 86400, and if you then parse "before", it
will get negative, then "last thursday" will be the absolute reference.

'f course, "one day before last thursday in september" will be a PITA.

Ciao,
Dscho

```

## Junio C Hamano, 2005-11-17 22:54

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <7v1x1eubpr.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v1x1eubpr.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <Pine.LNX.4.64.0511171223110.13959@g5.osdl.org>

```
Linus Torvalds <torvalds@osdl.org> writes:

> ..., 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).
> ...
> 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".

It is not English but Gittish, which is fine, but it somehow
reminds me of the funny way users make themselves understood by
IF parsers ;-).  I am afraid you started small but now are going
towards the same insanity of gnudate (it has insane yacc grammar
to grok these things), and I suspect we'd better draw a line
somewhere.

> 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.

I think this is a useful change.  Thanks.

```

## H. Peter Anvin, 2005-11-17 23:18

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <437D0FC8.6000906@zytor.com>
URL: https://gitlist.dev/e/437D0FC8.6000906%40zytor.com
In-Reply-To: <Pine.LNX.4.64.0511171223110.13959@g5.osdl.org>

```
Linus Torvalds wrote:
> 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".
> 

I believe English would always parse from right to left, it might be the 
right thing to do...

	-hpa

```

## Linus Torvalds, 2005-11-17 23:18

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <Pine.LNX.4.64.0511171505080.13959@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0511171505080.13959%40g5.osdl.org
In-Reply-To: <7v1x1eubpr.fsf@assigned-by-dhcp.cox.net>

```


On Thu, 17 Nov 2005, Junio C Hamano wrote:
>
> It is not English but Gittish, which is fine, but it somehow
> reminds me of the funny way users make themselves understood by
> IF parsers ;-).  I am afraid you started small but now are going
> towards the same insanity of gnudate (it has insane yacc grammar
> to grok these things), and I suspect we'd better draw a line
> somewhere.

I think I'm done.

The multi-week "3 sundays ago" part came for free, but the "last sunday" 
was actually something I liked.

Seriously, I can't imagine what else we'd want. It parses exact dates 
(thanks to the old date-parsing code), and it now parses all the normal 
"lazy dates" I can think of.

The fact that you can combine "last saturday" with "three days ago" is 
really not a feature as much as a result of the algorithm being so simple 
that it just doesn't care, and the combination just happens to work.

My examples were a bit silly as a result. In real life, you'd probably 
never use any combinations, but simply use

	"December 5th"
	"last sunday"
	"yesterday"
	"two days ago"
	"12 hours ago"

and the fact that then some (but definitely not all) combinations of the 
above all work is really just an accident and not something that people 
should necessarily even depend on.

> > 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.
> 
> I think this is a useful change.  Thanks.

That's actually not a new change, the approxidate thing always worked that 
way, but I thought I'd point it out.

		Linus

```

## Linus Torvalds, 2005-11-17 23:23

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <Pine.LNX.4.64.0511171520390.13959@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0511171520390.13959%40g5.osdl.org
In-Reply-To: <Pine.LNX.4.64.0511171505080.13959@g5.osdl.org>

```


On Thu, 17 Nov 2005, Linus Torvalds wrote:
>
> I think I'm done.

The only thing I might want to do is add some support for time-of-day to 
the thing. Notably "noon" and "midnight".

		Linus

```

## Linus Torvalds, 2005-11-17 23:30

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <Pine.LNX.4.64.0511171523170.13959@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0511171523170.13959%40g5.osdl.org
In-Reply-To: <437D0FC8.6000906@zytor.com>

```


On Thu, 17 Nov 2005, H. Peter Anvin wrote:
> 
> I believe English would always parse from right to left, it might be the right
> thing to do...

I'll try if that makes any difference. It would have some other advantages 
(ie it would make it easy to actually differentiate between "ago" and 
"from now").

		Linus

```

## Johannes Schindelin, 2005-11-17 23:32

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <Pine.LNX.4.63.0511180030260.18775@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0511180030260.18775%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <Pine.LNX.4.64.0511171505080.13959@g5.osdl.org>

```
Hi,

On Thu, 17 Nov 2005, Linus Torvalds wrote:

> Seriously, I can't imagine what else we'd want.

An error when there's a chance the result is unexpected?

Ciao,
Dscho

```

## Martin Langhoff, 2005-11-18 01:40

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <46a038f90511171740x756b0336ib8b8937ee3a2af03@mail.gmail.com>
URL: https://gitlist.dev/e/46a038f90511171740x756b0336ib8b8937ee3a2af03%40mail.gmail.com
In-Reply-To: <Pine.LNX.4.63.0511180030260.18775@wbgn013.biozentrum.uni-wuerzburg.de>

```
On 11/18/05, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Thu, 17 Nov 2005, Linus Torvalds wrote:
> > Seriously, I can't imagine what else we'd want.
> An error when there's a chance the result is unexpected?

That'd be even harder to define -- I'd rather have it spit out what it
interpreted so that porcelains can display it to the user. The user
can tell at a glance if the parser is off -- for it will be off by a
mile.


m

```

## Linus Torvalds, 2005-11-18 02:38

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <Pine.LNX.4.64.0511171828380.13959@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0511171828380.13959%40g5.osdl.org
In-Reply-To: <46a038f90511171740x756b0336ib8b8937ee3a2af03@mail.gmail.com>

```


On Fri, 18 Nov 2005, Martin Langhoff wrote:
> 
> That'd be even harder to define -- I'd rather have it spit out what it
> interpreted so that porcelains can display it to the user. The user
> can tell at a glance if the parser is off -- for it will be off by a
> mile.

Well, quite frankly, almost always it's pretty damn obvious.

We could make it less so: the most common mistake when it doesn't parse 
sanely is that it doesn't parse anything at all, but it saw a number 
somewhere, and thought it was a day of the month.

For example, "last janurary" will silently parse to just "1" (miss-spelled 
"january"), which will be interpreted as the "first of this month".

And we could make _that_ be an error. If you want the first of this month, 
you'd have to spell out the month, ie write "Nov 1" instead of just "1".

Apart from that parsign error, pretty much everything else will tend to 
parse correctly or just give "now" (which is pretty obvious when you ask 
for a log "since now", and get an empty answer back).

But quite frankly, I don't think the approximate date-parsing is serious 
enough to even worry about these kinds of things. I actually use it, but I 
don't think anybody _depends_ on it. It's useful to do

	gitk --since=last.week

just as a way to speed up the startup (if you're just interested in the 
top of the tree, the kernel history is so big that it's just pointless to 
do a full gitk, and doing the "since last week" is a quick way to just 
limit the history enough that it makes the graph cleaner).

And if you get that wrong, who cares? It's not a big deal. The approxidate 
parsing is one of those "hey, that's nice" features, but it's definitely 
not important.

		Linus

```

## Johannes Schindelin, 2005-11-18 02:53

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <Pine.LNX.4.63.0511180350430.6359@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0511180350430.6359%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <46a038f90511171740x756b0336ib8b8937ee3a2af03@mail.gmail.com>

```
Hi,

On Fri, 18 Nov 2005, Martin Langhoff wrote:

> On 11/18/05, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > On Thu, 17 Nov 2005, Linus Torvalds wrote:
> > > Seriously, I can't imagine what else we'd want.
> > An error when there's a chance the result is unexpected?
> 
> That'd be even harder to define -- I'd rather have it spit out what it
> interpreted so that porcelains can display it to the user. The user
> can tell at a glance if the parser is off -- for it will be off by a
> mile.

Yes, it may be off by a mile. But if there exists a feature to specify a 
date that comfortably, people don't RTFM, but use it.

Now comes the rub: if nothing is displayed, they take it that everything 
was fine. *If* something was displayed, one knew that the code parsed 
yesterday when last year was meant. But *if not*, nobody knows.

This is dangerous. It is wrong, but does not say so.

Hth,
Dscho

```

## David Roundy, 2005-11-18 12:12

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <20051118121210.GA19714@abridgegame.org>
URL: https://gitlist.dev/e/20051118121210.GA19714%40abridgegame.org
In-Reply-To: <Pine.LNX.4.64.0511171520390.13959@g5.osdl.org>

```
On Thu, Nov 17, 2005 at 03:23:00PM -0800, Linus Torvalds wrote:
> On Thu, 17 Nov 2005, Linus Torvalds wrote:
> >
> > I think I'm done.
> 
> The only thing I might want to do is add some support for time-of-day to 
> the thing. Notably "noon" and "midnight".

Don't forget "high noon"!  (and perhaps "tea time"?)  :)
-- 
David Roundy
http://www.darcs.net

```

## Johannes Schindelin, 2005-11-18 13:20

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <Pine.LNX.4.63.0511181419340.28109@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0511181419340.28109%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <20051118121210.GA19714@abridgegame.org>

```
Hi,

On Fri, 18 Nov 2005, David Roundy wrote:

> Don't forget "high noon"!  (and perhaps "tea time"?)  :)

How about "dooms day"? I would like to do this:

	git-whatchanged -p --until="dooms day"

Hmm?

Ciao,
Dscho

```

## Randy.Dunlap, 2005-11-18 16:08

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <Pine.LNX.4.58.0511180806550.25159@shark.he.net>
URL: https://gitlist.dev/e/Pine.LNX.4.58.0511180806550.25159%40shark.he.net
In-Reply-To: <Pine.LNX.4.63.0511181419340.28109@wbgn013.biozentrum.uni-wuerzburg.de>

```
On Fri, 18 Nov 2005, Johannes Schindelin wrote:

> On Fri, 18 Nov 2005, David Roundy wrote:
>
> > Don't forget "high noon"!  (and perhaps "tea time"?)  :)
>
> How about "dooms day"? I would like to do this:
>
> 	git-whatchanged -p --until="dooms day"
>
> Hmm?

Sure, and throw in "ides" (15th afaik) and moon phases
while you are at it.

-- 
~Randy  [who would just use ISO standard date format]

```

## Linus Torvalds, 2005-11-18 16:56

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <Pine.LNX.4.64.0511180842480.13959@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0511180842480.13959%40g5.osdl.org
In-Reply-To: <20051118121210.GA19714@abridgegame.org>

```


On Fri, 18 Nov 2005, David Roundy wrote:
> 
> Don't forget "high noon"!  (and perhaps "tea time"?)  :)

Done.

    [torvalds@g5 git]$ ./test-date "now" "midnight" "high noon" "tea-time"
    now -> bad -> Wed Dec 31 16:00:00 1969
    now -> Fri Nov 18 08:50:54 2005

    midnight -> bad -> Wed Dec 31 16:00:00 1969
    midnight -> Fri Nov 18 00:00:00 2005

    high noon -> bad -> Wed Dec 31 16:00:00 1969
    high noon -> Thu Nov 17 12:00:00 2005

    tea-time -> bad -> Wed Dec 31 16:00:00 1969
    tea-time -> Thu Nov 17 17:00:00 2005

Thanks for pointing out tea-time.

This is also written to easily extended to allow people to add their own 
important dates like Christmas and their own birthdays.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---
diff --git a/date.c b/date.c
index d2a67cc..3e11500 100644
--- a/date.c
+++ b/date.c
@@ -468,12 +468,52 @@ static void update_tm(struct tm *tm, uns
 	localtime_r(&n, tm);
 }
 
+static void date_yesterday(struct tm *tm, int *num)
+{
+	update_tm(tm, 24*60*60);
+}
+
+static void date_time(struct tm *tm, int hour)
+{
+	if (tm->tm_hour < hour)
+		date_yesterday(tm, NULL);
+	tm->tm_hour = hour;
+	tm->tm_min = 0;
+	tm->tm_sec = 0;
+}
+
+static void date_midnight(struct tm *tm, int *num)
+{
+	date_time(tm, 0);
+}
+
+static void date_noon(struct tm *tm, int *num)
+{
+	date_time(tm, 12);
+}
+
+static void date_tea(struct tm *tm, int *num)
+{
+	date_time(tm, 17);
+}
+
+static const struct special {
+	const char *name;
+	void (*fn)(struct tm *, int *);
+} special[] = {
+	{ "yesterday", date_yesterday },
+	{ "noon", date_noon },
+	{ "midnight", date_midnight },
+	{ "tea", date_tea },
+	{ NULL }
+};
+
 static const char *number_name[] = {
 	"zero", "one", "two", "three", "four",
 	"five", "six", "seven", "eight", "nine", "ten",
 };
 
-static struct typelen {
+static const struct typelen {
 	const char *type;
 	int length;
 } typelen[] = {
@@ -487,7 +527,8 @@ static struct typelen {
 
 static const char *approxidate_alpha(const char *date, struct tm *tm, int *num)
 {
-	struct typelen *tl;
+	const struct typelen *tl;
+	const struct special *s;
 	const char *end = date;
 	int n = 1, i;
 
@@ -502,9 +543,12 @@ static const char *approxidate_alpha(con
 		}
 	}
 
-	if (match_string(date, "yesterday") > 8) {
-		update_tm(tm, 24*60*60);
-		return end;
+	for (s = special; s->name; s++) {
+		int len = strlen(s->name);
+		if (match_string(date, s->name) == len) {
+			s->fn(tm, num);
+			return end;
+		}
 	}
 
 	if (!*num) {

```

## Linus Torvalds, 2005-11-18 17:00

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <Pine.LNX.4.64.0511180857170.13959@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0511180857170.13959%40g5.osdl.org
In-Reply-To: <Pine.LNX.4.58.0511180806550.25159@shark.he.net>

```


On Fri, 18 Nov 2005, Randy.Dunlap wrote:
>
> ~Randy  [who would just use ISO standard date format]

That actually _does_ work, and has done so since the beginning:

   [torvalds@g5 git]$ ./test-date "2005-11-02 14:45:00"
   2005-11-02 14:45:00 -> 1130971500 -0800 -> Wed Nov  2 14:45:00 2005
   2005-11-02 14:45:00 -> Wed Nov  2 14:45:00 2005

ie both the exact and the fuzzy date parsing will happily accept ISO 
standard date format and exact times.

But when you want to know what happened since high tea yesterday, the 
fuzzy format is unbeatable.

			Linus

```

## Andreas Ericsson, 2005-11-18 17:26

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <437E0ECC.8000503@op5.se>
URL: https://gitlist.dev/e/437E0ECC.8000503%40op5.se
In-Reply-To: <Pine.LNX.4.64.0511180842480.13959@g5.osdl.org>

```
Linus Torvalds wrote:
> 
> On Fri, 18 Nov 2005, David Roundy wrote:
> 
>>Don't forget "high noon"!  (and perhaps "tea time"?)  :)
> 
> 
> Done.
> 

What about Discordian dates? You seem to be having so much fun and I'd 
hate to spoil it for you. :)

It should be easier than Gregorian ones too.

5 months with 73 days each; Chaos, Discord, Confusion, Bureaucracy, The 
Aftermath
5 days: Sweetmorn, Boomtime, Pungenday, Prickle-Prickle, Setting Orange

February 29 is "St. Tibs day".

For years, just tack on 1166 and you're good to go.

It'd be just lovely to be able to say
	git whatchanged --since=chaos

Incidentally, git was first released in "Discord" which seems somehow 
appropriate. :)

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

```

## Linus Torvalds, 2005-11-18 17:33

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <Pine.LNX.4.64.0511180931390.13959@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0511180931390.13959%40g5.osdl.org
In-Reply-To: <437E0ECC.8000503@op5.se>

```


On Fri, 18 Nov 2005, Andreas Ericsson wrote:
> 
> 5 months with 73 days each; Chaos, Discord, Confusion, Bureaucracy, The
> Aftermath
> 5 days: Sweetmorn, Boomtime, Pungenday, Prickle-Prickle, Setting Orange
> 
> February 29 is "St. Tibs day".

I'm sorry, but having "git log --since=confusion" would just be 
irresponsible.

		Linus

```

## Matthias Urlichs, 2005-11-18 18:07

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <pan.2005.11.18.18.07.37.819505@smurf.noris.de>
URL: https://gitlist.dev/e/pan.2005.11.18.18.07.37.819505%40smurf.noris.de
In-Reply-To: <Pine.LNX.4.58.0511180806550.25159@shark.he.net>

```
Randy.Dunlap wrote:

> ~Randy  [who would just use ISO standard date format]

You can't just use non-confusing dates. 
People used to confusion would be confused.

Speaking of which ..:

Linus Torvalds wrote:
>> 5 months with 73 days each; Chaos, Discord, Confusion, Bureaucracy, The
>>  Aftermath
> I'm sorry, but having "git log --since=confusion" would just be
> irresponsible.
> 
Possibly, but on the other hand there'd be a lot more truth in these than
in our current month names. (November hasn't been the ninth month for
*some* time now...)

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
While there's life, there's hope.
		-- Publius Terentius Afer (Terence)

```

## H. Peter Anvin, 2005-11-18 18:08

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <437E18B8.8040909@zytor.com>
URL: https://gitlist.dev/e/437E18B8.8040909%40zytor.com
In-Reply-To: <Pine.LNX.4.63.0511181419340.28109@wbgn013.biozentrum.uni-wuerzburg.de>

```
Johannes Schindelin wrote:
> Hi,
> 
> On Fri, 18 Nov 2005, David Roundy wrote:
> 
> 
>>Don't forget "high noon"!  (and perhaps "tea time"?)  :)
> 
> 
> How about "dooms day"? I would like to do this:
> 
> 	git-whatchanged -p --until="dooms day"
> 

Domesday was some time in August 1086, right?

	-hpa

```

## Junio C Hamano, 2005-11-19 00:00

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <7vzmo1ecbf.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vzmo1ecbf.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <Pine.LNX.4.64.0511180857170.13959@g5.osdl.org>

```
Linus Torvalds <torvalds@osdl.org> writes:

> On Fri, 18 Nov 2005, Randy.Dunlap wrote:
>>
>> ~Randy  [who would just use ISO standard date format]
>
> That actually _does_ work, and has done so since the beginning:
>
>    [torvalds@g5 git]$ ./test-date "2005-11-02 14:45:00"

Doesn't ISO spell that as "2005-11-02T14:45:00"?

```

## Andreas Ericsson, 2005-11-19 00:07

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <437E6CAB.8060200@op5.se>
URL: https://gitlist.dev/e/437E6CAB.8060200%40op5.se
In-Reply-To: <7vzmo1ecbf.fsf@assigned-by-dhcp.cox.net>

```
Junio C Hamano wrote:
> Linus Torvalds <torvalds@osdl.org> writes:
> 
> 
>>On Fri, 18 Nov 2005, Randy.Dunlap wrote:
>>
>>>~Randy  [who would just use ISO standard date format]
>>
>>That actually _does_ work, and has done so since the beginning:
>>
>>   [torvalds@g5 git]$ ./test-date "2005-11-02 14:45:00"
> 
> 
> Doesn't ISO spell that as "2005-11-02T14:45:00"?
> 

nox!exon:~$ date --iso-8601=seconds
2005-11-19T01:04:56+0100

No human will spell it with T though.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

```

## Randal L. Schwartz, 2005-11-19 00:28

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <864q69bhvz.fsf@blue.stonehenge.com>
URL: https://gitlist.dev/e/864q69bhvz.fsf%40blue.stonehenge.com
In-Reply-To: <437E6CAB.8060200@op5.se>

```
>>>>> "Andreas" == Andreas Ericsson <ae@op5.se> writes:

>>> [torvalds@g5 git]$ ./test-date "2005-11-02 14:45:00"
>> Doesn't ISO spell that as "2005-11-02T14:45:00"?
>> 

Andreas> nox!exon:~$ date --iso-8601=seconds
Andreas> 2005-11-19T01:04:56+0100

Andreas> No human will spell it with T though.

But they might be getting it out of another tool like that.

And, let me apologize for derailing Linus for a week.  Sorry.  :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

```

## Linus Torvalds, 2005-11-19 00:48

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <Pine.LNX.4.64.0511181643190.13959@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0511181643190.13959%40g5.osdl.org
In-Reply-To: <437E6CAB.8060200@op5.se>

```


On Sat, 19 Nov 2005, Andreas Ericsson wrote:
> 
> nox!exon:~$ date --iso-8601=seconds
> 2005-11-19T01:04:56+0100
> 
> No human will spell it with T though.

Git doesn't care.

	./test-date 2005-11-19T01:04:56+0100

results in

	2005-11-19T01:04:56+0100 -> 1132358696 +0100 -> Fri Nov 18 16:04:56 2005

which should be correct: I'm in PST, test-date shows the "git time" 
(seconds since the epoch plus TZ) and then the local time in 
human-readable ascii.

The "T" to the git date parser is just a superfluous character that just 
happens to be a perfectly valid way to separate out the numbers ;)

		Linus

```

## Johannes Schindelin, 2005-11-20 23:36

Subject: Re: Teach "approxidate" about weekday syntax
Message-ID: <Pine.LNX.4.63.0511210034370.24681@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0511210034370.24681%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <pan.2005.11.18.18.07.37.819505@smurf.noris.de>

```
Hi,

On Fri, 18 Nov 2005, Matthias Urlichs wrote:

> Linus Torvalds wrote:
> > I'm sorry, but having "git log --since=confusion" would just be
> > irresponsible.
> > 
> Possibly, but on the other hand there'd be a lot more truth in these than
> in our current month names. (November hasn't been the ninth month for
> *some* time now...)

Well, I know a girl who gave birth to her child in November. And I guess 
she's not the only one.

Hth,
Dscho

```
