From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: olivier.delemar@free.fr
Subject: BUG #16192: Function to_char(date,'IW') return incorrect value for last days of a year
Date: Mon, 06 Jan 2020 08:39:39 +0000
Message-ID: <16192-0a7c830763891773@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 16192
Logged by: Olivier Delemar
Email address: olivier.delemar@free.fr
PostgreSQL version: 9.6.6
Operating system: Linux
Description:
According to ISO 8691 specifications, the first week of a year is the week
containing the first thursday of the year. Thus, the 30 and 31 of december
2019 should be in the first week of 2020, but "to_char" set them in the
first week of... 2019!
[postgres] $ psql
psql (9.6.6)
Saisissez « help » pour l'aide.
# select to_char('2019-12-30'::date, 'YYYY-IW');
to_char
---------
2019-01
(1 ligne)
Temps : 152,799 ms
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, olivier.delemar@free.fr
Subject: Re: BUG #16192: Function to_char(date,'IW') return incorrect value for last days of a year
In-Reply-To: <16192-0a7c830763891773@postgresql.org>
References: <16192-0a7c830763891773@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox