MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / get_current_date

Function get_current_date

backup/wangchao.py:121–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119
120#获取日期
121def get_current_date():
122 now = datetime.datetime.now()
123 year_str = str(now.year)
124 month_str = f"0{now.month}" if now.month < 10 else str(now.month)
125 day_str = f"0{now.day}" if now.day < 10 else str(now.day)
126 print(f"当前日期{year_str}{month_str}{day_str}")
127 return year_str + month_str + day_str
128
129#获取阅读列表
130def fetch_article_list():

Callers 1

fetch_article_listFunction · 0.85

Calls 1

printFunction · 0.50

Tested by

no test coverage detected