Skip site navigation (1) Skip section navigation (2)

Re: [GENERAL] ISO week dates

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Brendan Jurd <direvus(at)gmail(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [GENERAL] ISO week dates
Date: 2006-10-12 18:20:33
Message-ID: 452E8771.5040903@lelarge.info (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-patches
Peter Eisentraut a écrit :
> Guillaume Lelarge wrote:
>> I've tried to work on the first one, the ISO day field. My patch is
>> attached and is against CVS HEAD. It only takes care of the code,
>> nothing is done for documentation matter. It works with me :
>>
>> toto=# select to_char(('2006-10-'||a+2)::date, 'DAY') as "dow",
>>    to_char(('2006-10-'||a+2)::date, 'ID') as "ID field",
>>    to_char(('2006-10-'||a+2)::date, 'D') as "D field"
>>    from generate_series(1, 15) as a;
> 
> There is an inconsistency here:  'IYYY' is the four-digit ISO year, 'IW' 
> is the two-digit ISO week, but 'ID' would be the one-digit ISO 
> day-of-the-week.  I'm not sure we can fix that, but I wanted to point 
> it out.
> 

Is there a two digit ISO day of the week ? If not, we should use ID. As
you say, I don't know what we can do about that. I used Brendan Jurd's
idea, perhaps he can tell us more on this matter.

> We should also support a format for ISO day-of-the-year, which might 
> be 'IDDD'.
> 

I will work tomorrow on this one.

Regards.


-- 
Guillaume.
<!-- http://abs.traduc.org/
     http://lfs.traduc.org/
     http://traduc.postgresqlfr.org/ -->

In response to

Responses

pgsql-patches by date

Next:From: Neil ConwayDate: 2006-10-12 18:50:52
Subject: Re: Documentation fix for --with-ldap
Previous:From: Tom LaneDate: 2006-10-12 18:02:22
Subject: Re: array_accum aggregate

pgsql-general by date

Next:From: brianDate: 2006-10-12 18:21:02
Subject: some log statements ignored
Previous:From: Tom LaneDate: 2006-10-12 18:14:49
Subject: Re: Find out the number of rows returned by refcursor?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group