summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2012-08-07 13:34:44 -0400
committerBruce Momjian <bruce@momjian.us>2012-08-07 13:34:44 -0400
commitac78c4178bec7b252d22a39515ad6efd6c1a7d7e (patch)
tree03c163cca94916b05493d248c2f91263dcd857e9 /doc/src
parentfbcfa90bb8ceb77f7763b6ae16bcbb777849ccee (diff)
Fix to_char(), to_date(), and to_timestamp() to handle negative/BC
century specifications just like positive/AD centuries. Previously the behavior was either wrong or inconsistent with positive/AD handling. Centuries without years now always assume the first year of the century, which is now documented.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/func.sgml4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index ee42da80257..d5ad4718b15 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -5575,7 +5575,9 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
if there is a <literal>YYY</literal>, <literal>YYYY</literal> or
<literal>Y,YYY</literal> field. If <literal>CC</literal> is used with
<literal>YY</literal> or <literal>Y</literal> then the year is computed
- as <literal>(CC-1)*100+YY</literal>.
+ as the year in the specified century. If the century is
+ specified but the year is not, the first year of the century
+ is assumed.
</para>
</listitem>