Year 2024: Extracting week from date gives wrong results for the lasttwo days of the year

Поиск
Список
Период
Сортировка
От Michael Monscheuer
Тема Year 2024: Extracting week from date gives wrong results for the lasttwo days of the year
Дата
Msg-id 018392b4-52b1-5166-0c71-6bf09c65d530@digiperience.de
обсуждение исходный текст
Ответы Re: Year 2024: Extracting week from date gives wrong results for thelast two days of the year  (Jeff Janes <jeff.janes@gmail.com>)
Re: Year 2024: Extracting week from date gives wrong results for thelast two days of the year  (Félix GERZAGUET <felix.gerzaguet@gmail.com>)
Re: Year 2024: Extracting week from date gives wrong results for thelast two days of the year  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
Список pgsql-bugs
Team,

Extracting the week from a date gives wrong results for the last two days of 2024.

SELECT EXTRACT (WEEK FROM DATE '20241230');

or

SELECT EXTRACT (WEEK FROM DATE '20241231');

both result in a value of  1
which is wrong, obviously...

The expected result is 53

The results for the year 2020 are correct:
SELECT EXTRACT (WEEK FROM DATE '20201230');
results to 53

Version:
PostgreSQL 10.3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9), 64-bit
on Amazon RDS

Greetings from Hamburg, DE

MiMo



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: NOTIFY does not work as expected
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: Year 2024: Extracting week from date gives wrong results for thelast two days of the year