From 1ae1202d68a765fb0f1467c173f960fb69bb587d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jun=20Omae=20=28=E5=A4=A7=E5=89=8D=20=E6=BD=A4=29?= <42682+jun66j5@users.noreply.github.com> Date: Thu, 30 Jan 2025 17:21:27 +0900 Subject: [PATCH] Update babel/dates.py Co-authored-by: Tomas R. --- babel/dates.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/babel/dates.py b/babel/dates.py index f52905d45..ef9b7446e 100644 --- a/babel/dates.py +++ b/babel/dates.py @@ -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: