Skip to content

Commit 7924036

Browse files
committed
Doc: fix bogus to_date() examples.
November doesn't have 31 days. Remarkably, this thinko has escaped detection since commit 3f19987. Noted by Y. Saburov. Discussion: https://postgr.es/m/171276122213.681.531905738590773705@wrigleys.postgresql.org
1 parent 0341d4b commit 7924036

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/src/sgml/func.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6713,11 +6713,11 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
67136713
use some non-digit character or template after <literal>YYYY</literal>,
67146714
otherwise the year is always interpreted as 4 digits. For example
67156715
(with the year 20000):
6716-
<literal>to_date('200001131', 'YYYYMMDD')</literal> will be
6716+
<literal>to_date('200001130', 'YYYYMMDD')</literal> will be
67176717
interpreted as a 4-digit year; instead use a non-digit
67186718
separator after the year, like
6719-
<literal>to_date('20000-1131', 'YYYY-MMDD')</literal> or
6720-
<literal>to_date('20000Nov31', 'YYYYMonDD')</literal>.
6719+
<literal>to_date('20000-1130', 'YYYY-MMDD')</literal> or
6720+
<literal>to_date('20000Nov30', 'YYYYMonDD')</literal>.
67216721
</para>
67226722
</listitem>
67236723

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy