Skip to content

Commit

Permalink
Update babel/dates.py
Browse files Browse the repository at this point in the history
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
  • Loading branch information
jun66j5 and tomasr8 authored Jan 30, 2025
1 parent b0175f4 commit 1ae1202
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions babel/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -1483,8 +1483,7 @@ def format_year(self, char: str, num: int) -> str:
value = self.value.year
if char.isupper():
month = self.value.month
if month == 1:
if self.value.day < 7 and self.get_week_of_year() >= 52:
if month == 1 and self.value.day < 7 and self.get_week_of_year() >= 52:
value -= 1
elif month == 12:
if self.value.day > 25 and self.get_week_of_year() <= 2:
Expand Down

0 comments on commit 1ae1202

Please sign in to comment.