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

Re: [GENERAL] ISO week dates

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: guillaume(at)lelarge(dot)info
Cc: Brendan Jurd <direvus(at)gmail(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [GENERAL] ISO week dates
Date: 2006-10-12 17:17:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-generalpgsql-patches
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.

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

Peter Eisentraut

In response to


pgsql-patches by date

Next:From: Neil ConwayDate: 2006-10-12 17:22:17
Subject: Re: array_accum aggregate
Previous:From: Hiroshi SaitoDate: 2006-10-12 16:29:52
Subject: test_fsync on MinGW(win32)

pgsql-general by date

Next:From: David FetterDate: 2006-10-12 17:37:42
Subject: Re: Override system-defined cast?
Previous:From: SISTEMASDate: 2006-10-12 16:32:23

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