Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 57E01633076 for ; Sat, 27 Mar 2010 22:52:24 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 07240-01 for ; Sun, 28 Mar 2010 01:52:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yw0-f184.google.com (mail-yw0-f184.google.com [209.85.211.184]) by mail.postgresql.org (Postfix) with ESMTP id BB83F6323DF for ; Sat, 27 Mar 2010 22:52:13 -0300 (ADT) Received: by ywh14 with SMTP id 14so2677020ywh.15 for ; Sat, 27 Mar 2010 18:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:received:message-id:subject:to:cc:content-type; bh=ZCe7ckcLrlXEQunRzZSNbwJ5MHDa49gENvPjDn1bgfI=; b=qYvTTdaWr58y8bZMicvTZqMOGRhrRzlWD+755UkDnBi0MNmqSXrIUkwKXQWtbNBv4r oTiW3z24YIu8KQn78VZblqRk1GoWa6Q0LbPv+dMSOChNnlA/bzBxJTVBtLibLmw2ZnM2 N6LEnoFJ27w7a+vpGsu5KJsROJYl7XDL6LGNQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=XXz61cqorarwYWIl9Cq3wgCLpzXKgaDEed7fyB1Q3SxPn5j+syGEYpYhsESkAzcC04 DTmJlG8GZAi7KSXyIqMIn79Dv7lFIU05tN3ZSWx2heyf/QHc6j+S2qzFiKuSGanO1OX2 j+SZHIV44Zut7Je9gHD6c0pbWpmtJT/VO5d+k= MIME-Version: 1.0 Received: by 10.100.253.19 with HTTP; Sat, 27 Mar 2010 18:51:52 -0700 (PDT) In-Reply-To: <40FB2AE5907F9743A593A85015F157BF03FE1086@ARG-EXVS03.corp.argushealth.com> References: <4BAB2C15.8090406@wp.pl> <4BAC9107.5070701@wp.pl> <4BAE68FA.8000803@wp.pl> <40FB2AE5907F9743A593A85015F157BF03FE1086@ARG-EXVS03.corp.argushealth.com> From: Jorge Godoy Date: Sat, 27 Mar 2010 22:51:52 -0300 Received: by 10.101.154.5 with SMTP id g5mr5027508ano.224.1269741132139; Sat, 27 Mar 2010 18:52:12 -0700 (PDT) Message-ID: Subject: Re: Week to date function To: "Hiltibidal, Rob" Cc: Ireneusz Pluta , Sergey Konoplev , pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=0016e6d27d44234c1c0482d2a5e6 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.002 tagged_above=-10 required=5 tests=BAYES_50=0.001, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201003/209 X-Sequence-Number: 33916 --0016e6d27d44234c1c0482d2a5e6 Content-Type: text/plain; charset=ISO-8859-1 It isn't. The norm is defined by ISO 8601. There is a lot of "fun" into date calculations. The rule is to counts the number of Thursdays on a year to get the correct number of weeks. What bothers me more is that here it is cultural that weeks start on Sunday, but ISO 8601 says they start on Monday. In Portuguese, the word for Monday can also be translated as "Second", as in "Second day". How to say that the second day is in fact the first? :-) -- Jorge Godoy On Sat, Mar 27, 2010 at 18:31, Hiltibidal, Rob < Rob.Hiltibidal@argushealth.com> wrote: > Uhhhh only 52 calendar weeks in a year... I'm almost sure that is the > norm > > --0016e6d27d44234c1c0482d2a5e6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable It isn't. =A0The norm is defined by ISO 8601.

There = is a lot of "fun" into date calculations.

The rule is to counts the number of Thursdays on a year to get the correc= t number of weeks.

What bothers me more is that here it is cultural that weeks = start on Sunday, but ISO 8601 says they start on Monday. =A0In Portuguese, = the word for Monday can also be translated as "Second", as in &qu= ot;Second day". How to say that the second day is in fact the first? := -)

--
Jorge Godoy =A0 =A0 <= jgodoy@gmail.com>


On Sat, Mar 27, 2010 at 18:31, Hiltibida= l, Rob <Rob.Hiltibidal@argushealth.com> wrote:
Uhhhh only 52 calendar weeks in a year... I'm almost sure that is the norm

--0016e6d27d44234c1c0482d2a5e6--