You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by bp...@apache.org on 2009/11/10 03:31:01 UTC

svn commit: r834310 - /db/derby/docs/trunk/src/ref/rrefdatefunc.dita

Author: bpendleton
Date: Tue Nov 10 02:31:00 2009
New Revision: 834310

URL: http://svn.apache.org/viewvc?rev=834310&view=rev
Log:
DERBY-4107: Clarify description of DATE function with integer argument.

This change clarifies the description of the DATE function when it is
given an integer argument. The previous text stated that the DATE function
took the argument as the number of days since the year 0001, but this is
incorrect; the function uses 1970 as the reference year and computes the
number of days since then.

The change also adds an example of the result of DATE(789).

Modified:
    db/derby/docs/trunk/src/ref/rrefdatefunc.dita

Modified: db/derby/docs/trunk/src/ref/rrefdatefunc.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefdatefunc.dita?rev=834310&r1=834309&r2=834310&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefdatefunc.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefdatefunc.dita Tue Nov 10 02:31:00 2009
@@ -37,11 +37,12 @@
 <li>If the argument is a date, timestamp, or valid string representation of
 a date or timestamp: The result is the date part of the value.</li>
 <li>If the argument is a number: The result is the date that is n-1 days after
-January 1, 0001, where n is the integral part of the number.</li>
+January 1, 1970, where n is the integral part of the number.</li>
 <li>If the argument is a string with a length of 7: The result is the date
 represented by the string.</li>
 </ul></p></section>
 <refsyn><title>Syntax</title> <codeblock><b>DATE ( <i>expression</i> )</b></codeblock> </refsyn>
-<example> <p>This example results in an internal representation of '1988-12-25'.</p> <codeblock><b>VALUES DATE('1988-12-25')</b></codeblock> </example>
+<example> <p>This example results in an internal representation of '1988-12-25'.</p> <codeblock><b>VALUES DATE('1988-12-25')</b></codeblock> 
+<p>This example results in an internal representation of '1972-02-28'.</p> <codeblock><b>VALUES DATE(789)</b></codeblock> </example>
 </refbody>
 </reference>