Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xin zeng get_days function #1019

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

woaichidami
Copy link

ef get_days(year, month):
"""
获取指定年份和月份的天数
"""
if month in {1, 3, 5, 7, 8, 10, 12}:
return 31
elif month in {4, 6, 9, 11}:
return 30
elif month == 2:
if is_leap(year):
return 29
else:
return 28
else:
return None # 对于非法的月份返回 None

@kenwoo666
Copy link

kenwoo666 commented Apr 9, 2024 via email

@leo97545
Copy link

leo97545 commented Apr 9, 2024 via email

2 similar comments
@tangwushuang
Copy link

tangwushuang commented Apr 9, 2024 via email

@Twist-echo
Copy link

Twist-echo commented Apr 9, 2024 via email

@moffcics
Copy link

moffcics commented Apr 9, 2024 via email

@RollerCoaste
Copy link

RollerCoaste commented Apr 9, 2024 via email

@upshalks
Copy link

upshalks commented Apr 9, 2024 via email

@peak-up-fsl
Copy link

peak-up-fsl commented Apr 9, 2024 via email

@beatricejhx
Copy link

beatricejhx commented Apr 9, 2024 via email

@Seraphxy
Copy link

Seraphxy commented Apr 9, 2024 via email

@894221671
Copy link

894221671 commented Apr 9, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet