git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Approxidate licensing

From
Linus Torvalds <torvalds@osdl.org>
Date
Oct 10, 2006, 18:17 UTC
Message-ID
<Pine.LNX.4.64.0610101102560.3952@g5.osdl.org>
In-Reply-To
<Pine.LNX.4.64.0610101246241.9789@iabervon.org>
On Tue, 10 Oct 2006, Daniel Barkalow wrote:
Show 5 quoted lines
> 
> Would the three of you agree to license date.c under the LGPL or BSD? It 
> looks like you're the only authors of non-trivial changes [1]. And it seems 
> reasonable to want the date parsing thing under non-GPL terms outside of 
> git.

I'm not a huge fan of the LGPL, especially with the recent issues of GPLv3. The reason? The LGPL is expressly designed to be compatible with the GPL, but it's designed to be compatible with any version (and you can't limit it, the way you can the real GPL).

So you can take LGPL 2.1 code, and relicense it under GPLv3, and make changes to it, and those changes won't be available to a GPLv2 project.

That said, I don't think the date.c code is all that important, and I don't see why anybody would do something nasty like that anyway, so I guess I don't actually care. A lot of the approxidate code was actually written as a joke, and it will parse just about anything without any error, and without telling you that it returned a date that may not make any sense at all.

For example, currently
	./test-date "$(cat date.c)"
returns
	Tue Nov 30 11:58:59 1937

for me, but don't ask me why. It's just put together the random numbers and month-names embedded in the source and made some insane decision that it must be a date (since you told it so). And it never returned an error.

Some other things are just silly and not even correct
	./test-date "One year ago yesterday at tea-time"

which doesn't even give the right answer (because it will go _backwards_ to tea-time on Oct 8th, even though it obviously _should_ return "Oct 9, 17:00". I don't have the energy to try to fix it.

It also needs this important patch to be complete. I don't know how this could ever have fallen through the cracks!

		Linus
---
diff --git a/date.c b/date.c
index 1825922..0b06994 100644
--- a/date.c
+++ b/date.c
@@ -657,6 +657,7 @@ static const struct typelen {
 	{ "hours", 60*60 },
 	{ "days", 24*60*60 },
 	{ "weeks", 7*24*60*60 },
+	{ "fortnights", 2*7*24*60*60 },
 	{ NULL }
 };	
 
Previous: Daniel BarkalowNext: Junio C Hamano
Message 2 of 6 in “Approxidate licensing”
  1. Daniel BarkalowOct 10, 2006
  2. Linus TorvaldsOct 10, 2006
  3. Junio C HamanoOct 10, 2006
  4. Junio C HamanoOct 11, 2006
  5. David WoodhouseOct 11, 2006
  6. Edesio Costa e SilvaOct 10, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.