Re: converting a specified year and week into a date

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: converting a specified year and week into a date
Date: 2007-02-14 10:01:45
Message-ID: 45D2DE09.1050901@cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/14/07 03:33, A. Kretschmer wrote:
> am Wed, dem 14.02.2007, um 3:10:17 -0600 mailte Ron Johnson folgendes:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 02/14/07 02:52, A. Kretschmer wrote:
>>> am Tue, dem 13.02.2007, um 13:56:15 -0800 mailte vanessa folgendes:
>> [snip]
>>> test=*# select get_week(2007,2);
>>> get_week
>>> -------------------------
>>> 08-01-2007 - 14-01-2007
>>> (1 row)
>> Is that week #2?
>>
>> If weeks start on Sunday (which is what they do in the US), then
>> week #2 would either start on 04-Jan or 11-Jan (depending on whether
>> the 01-Jan partial week is considered week #1 or week #0).
>
> Depends, there are different definitions. I have a calendar here and in
> this the 2. week 2007 starts on monday, 08-01-2007.

Brown paper bag time: I was looking at the February calendar and
"seeing" January...

> It's like with http://personal.ecu.edu/mccartyr/isowdcal.html, but i
> know, in america weeks starts with sunday.

Interesting web site.

The ISO 8601 rule is: The first week of the year is the
week containing the first Thursday.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF0t4JS9HxQb37XmcRArseAJ44Qrh9Jf+GrZoCxKbytbgC+bvbaACgo0sM
Tsqq67zsD6oCWukP6B7hjYk=
=kYtL
-----END PGP SIGNATURE-----

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2007-02-14 10:33:15 Re: Having a problem with my stored procedure
Previous Message Filip Rembiałkowski 2007-02-14 09:41:53 Re: backup database by cloning itself