[PATCH] Add a new pattern for zero-based months for Date/Time Formatting

Поиск
Список
Период
Сортировка
От Vincent Moreau
Тема [PATCH] Add a new pattern for zero-based months for Date/Time Formatting
Дата
Msg-id CAHZj6Fjf0av_5QRnqtj+RuKKMihK9s5grnYkt7Q=pgMFnC_R_w@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hi,

I came across date information from an external data source where the
month number is zero-based (January = 0, December = 11) and found that
I couldn't process it directly using the TO_DATE function.
This patch introduces a new pattern (MZ) for handling zero-based
months in Date/Time Formatting.

## Example

SELECT to_date('01012025', 'DDMZYYYY');
to_date
------------
2025-02-01

## Implementation notes

This is my first patch submission. I have tried to follow the
guidelines from various documents, but please let me know if anything
is missing or not aligned with expectations. My apologies in advance
for any oversights.

Thanks,
Vincent Moreau

Вложения

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