public inbox for [email protected]  
help / color / mirror / Atom feed
Week numbering
2+ messages / 2 participants
[nested] [flat]

* Week numbering
@ 2004-12-06 10:22 Troels Arvin <[email protected]>
  2004-12-21 01:02 ` Re: Week numbering Bruce Momjian <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Troels Arvin @ 2004-12-06 10:22 UTC (permalink / raw)
  To: pgsql-docs

Hello,

I was recently surprised to find that EXTRACT's day of the week
numbering is different than TO_CHAR's ditto. EXTRACT starts at 0==Sunday
while TO_CHAR starts at 1==Sunday.

A suggestion for two documentation notes is attached as a patch to
current CVS HEAD.

-- 
Greetings from Troels Arvin, Copenhagen, Denmark


Attachments:

  [text/x-patch] pgsql-day-of-week-docs.patch (1.2K, 2-pgsql-day-of-week-docs.patch)
  download | inline diff:
Index: doc/src/sgml/func.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/func.sgml,v
retrieving revision 1.229
diff -c -r1.229 func.sgml
*** doc/src/sgml/func.sgml	3 Dec 2004 18:34:31 -0000	1.229
--- doc/src/sgml/func.sgml	6 Dec 2004 10:16:57 -0000
***************
*** 4412,4417 ****
--- 4412,4424 ----
         1230 microseconds = 2.021230 seconds. 
        </para>
       </listitem>
+ 
+      <listitem>
+       <para><function>to_char</function>'s day of the week numbering
+         (see the 'D' formatting pattern) is different from that of the 
+         <function>extract</function> function.
+       </para>
+      </listitem>
      </itemizedlist>
     </para>
  
***************
*** 5146,5151 ****
--- 5153,5163 ----
  SELECT EXTRACT(DOW FROM TIMESTAMP '2001-02-16 20:38:40');
  <lineannotation>Result: </lineannotation><computeroutput>5</computeroutput>
  </screen>
+        <para>
+         Note that <function>extract</function>'s day of the week numbering is 
+         different from that of the <function>to_char</function> function.
+        </para>
+ 
        </listitem>
       </varlistentry>
  


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Week numbering
  2004-12-06 10:22 Week numbering Troels Arvin <[email protected]>
@ 2004-12-21 01:02 ` Bruce Momjian <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruce Momjian @ 2004-12-21 01:02 UTC (permalink / raw)
  To: Troels Arvin <[email protected]>; +Cc: pgsql-docs


Patch applied.  Thanks.

---------------------------------------------------------------------------


Troels Arvin wrote:
> Hello,
> 
> I was recently surprised to find that EXTRACT's day of the week
> numbering is different than TO_CHAR's ditto. EXTRACT starts at 0==Sunday
> while TO_CHAR starts at 1==Sunday.
> 
> A suggestion for two documentation notes is attached as a patch to
> current CVS HEAD.
> 
> -- 
> Greetings from Troels Arvin, Copenhagen, Denmark

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [email protected]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-12-21 01:02 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-12-06 10:22 Week numbering Troels Arvin <[email protected]>
2004-12-21 01:02 ` Bruce Momjian <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox