feat: update leap_year.py

This commit is contained in:
2025-09-05 00:52:21 +08:00
parent 239a0b50d0
commit 625df64987

View File

@@ -19,9 +19,9 @@ def get_day_of_month(year, month: int) -> int:
def get_day_of_month2(year, month: int) -> int:
if [1, 3, 5, 7, 8, 10, 12].__contains__(month):
if month in {1, 3, 5, 7, 8, 10, 12}:
return 31
elif [4, 6, 9, 11].__contains__(month):
elif month in {4, 6, 9, 11}:
return 30
elif month == 2 and is_leap_year(year):
return 29