add monthfirstday function

This commit is contained in:
yumoqing 2024-11-18 13:38:39 +08:00
parent 70be667377
commit d0bf300975

View File

@ -17,6 +17,10 @@ def days_between(date_str1, date_str2):
days = abs(delta.days) days = abs(delta.days)
return days return days
def monthfirstday():
d = datetime.now()
return '%4d-%02d-01' % (d.year, d.month)
def curDatetime(): def curDatetime():
return datetime.now() return datetime.now()