Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6d4f062

Browse filesBrowse 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 772faaf commit 6d4f062
Copy full SHA for 6d4f062

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎doc/src/sgml/func.sgml

Copy file name to clipboardExpand all lines: doc/src/sgml/func.sgml
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8401,11 +8401,11 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
84018401
use some non-digit character or template after <literal>YYYY</literal>,
84028402
otherwise the year is always interpreted as 4 digits. For example
84038403
(with the year 20000):
8404-
<literal>to_date('200001131', 'YYYYMMDD')</literal> will be
8404+
<literal>to_date('200001130', 'YYYYMMDD')</literal> will be
84058405
interpreted as a 4-digit year; instead use a non-digit
84068406
separator after the year, like
8407-
<literal>to_date('20000-1131', 'YYYY-MMDD')</literal> or
8408-
<literal>to_date('20000Nov31', 'YYYYMonDD')</literal>.
8407+
<literal>to_date('20000-1130', 'YYYY-MMDD')</literal> or
8408+
<literal>to_date('20000Nov30', 'YYYYMonDD')</literal>.
84098409
</para>
84108410
</listitem>
84118411

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.