python-babel / babel

The official repository for Babel, the Python Internationalization Library
http://babel.pocoo.org/
BSD 3-Clause "New" or "Revised" License
1.34k stars 448 forks source link

issue with en_AU locale #1133

Open alec000inspired opened 2 months ago

alec000inspired commented 2 months ago

Overview Description

When I use the en_AU locale, the date format for 2023-12-31 places it into W1 of 2023. I would expect this to be W53 of 2023 or possible W1 of 2024.

Steps to Reproduce

import datetime
import babel
import babel.dates
foo = babel.dates.format_date(datetime.date(year=2023, month=12, day=31), format="'W'w YYYY", locale='en_US')
bar = babel.dates.format_date(datetime.date(year=2023, month=12, day=31), format="'W'w YYYY", locale='en_AU')
print(foo)  # W53 2023 (correct)
print(bar)  # W1 2023 (incorrect)

Actual Results

'W1 2023'

Expected Results

'W53 2023'

RomainBarbason commented 1 month ago

Can i be assigned to this problem ? Thanks !

tomasr8 commented 1 month ago

Go for it :)