Re: [PATCH] getdate add a week when the wday is the same as the current one

2009-05-03 Thread Jim Meyering
Giuseppe Scrivano wrote: > I fixed the regression you found and added some new tests. ... >>From 0e1af7775a82aed00331a535ddadee2753d12e5e Mon Sep 17 00:00:00 2001 > From: Giuseppe Scrivano > Date: Fri, 1 May 2009 15:44:30 +0200 > Subject: [PATCH] > =?utf-8?q?*=20lib/getdate.y=20(get=5Fdate):=20Co

Re: [PATCH] getdate add a week when the wday is the same as the current one

2009-05-01 Thread Jan Minář
On Fri, May 1, 2009 at 09:57, Pádraig Brady wrote: > Jim Meyering wrote: >> I expect to push this shortly. >> Thank you! > >>>From 372c3b4a79def664b8fa73316c35caf39bf93e2c Mon Sep 17 00:00:00 2001 >> From: Giuseppe Scrivano >> Date: Fri, 1 May 2009 09:23:20 +0200 >> Subject: [PATCH] getdate: corr

Re: [PATCH] getdate add a week when the wday is the same as the current one

2009-05-01 Thread Giuseppe Scrivano
Hello, I fixed the regression you found and added some new tests. $ ./date -d "fri" +%a.%F ven.2009-05-01 $ date -d "fri" +%a.%F ven.2009-05-01 and: $ ./date -d "next fri" +%a.%F ven.2009-05-08 $ date -d "next fri" +%a.%F ven.2009-05-01 Regards, Giuseppe >From 0e1af7775a82aed00331a535ddadee

Re: [PATCH] getdate add a week when the wday is the same as the current one

2009-05-01 Thread Jim Meyering
Giuseppe Scrivano wrote: > This patch includes all your suggestions and new tests for > test-getdate.c. Thanks for the quick test addition! I want the summary line to start with "getdate: " and do be "high-level descriptive" so I moved your "add a week..." sentence into the body of the log. Also,

Re: [PATCH] getdate add a week when the wday is the same as the current one

2009-05-01 Thread Giuseppe Scrivano
Hello, This patch includes all your suggestions and new tests for test-getdate.c. Giuseppe Bruno Haible writes: > Jim Meyering wrote: >>tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7 >> + + 7 * (pc.day_ordinal >> ++ (0 < pc.day_ordi

Re: [PATCH] getdate add a week when the wday is the same as the current one

2009-05-01 Thread Bruno Haible
Jim Meyering wrote: > tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7 > + + 7 * (pc.day_ordinal > + + (0 < pc.day_ordinal > +&& tm.tm_wday == pc.day_number) > + - (0 < pc.day_ord

Re: [PATCH] getdate add a week when the wday is the same as the current one

2009-05-01 Thread Pádraig Brady
Jim Meyering wrote: > I expect to push this shortly. > Thank you! >>From 372c3b4a79def664b8fa73316c35caf39bf93e2c Mon Sep 17 00:00:00 2001 > From: Giuseppe Scrivano > Date: Fri, 1 May 2009 09:23:20 +0200 > Subject: [PATCH] getdate: correctly interpret "next monday" when run on a > Monday > > *

Re: [PATCH] getdate add a week when the wday is the same as the current one

2009-05-01 Thread Jim Meyering
Giuseppe Scrivano wrote: > what do you think of the following patch? When the same day as the > current one is provided then a week is added. It doesn't change the > behaviour for days in the past. > > It closes coreutils #25406. > > diff --git a/lib/getdate.y b/lib/getdate.y > index 877b264..815

[PATCH] getdate add a week when the wday is the same as the current one

2009-04-30 Thread Giuseppe Scrivano
Hello, what do you think of the following patch? When the same day as the current one is provided then a week is added. It doesn't change the behaviour for days in the past. It closes coreutils #25406. Giuseppe diff --git a/lib/getdate.y b/lib/getdate.y index 877b264..8154fd9 100644 --- a/li