We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
希望改进发送time,同时发送时间,日期,星期,节假日 下面是我用gpt生成的可能的代码
import requests from datetime import datetime # 获取当前日期 current_date = datetime.now().strftime("%Y-%m-%d") # 发送API请求 api_url = f"https://api.dategate.ai/holidays/{current_date}" response = requests.get(api_url) data = response.json() # 打印当前日期 print("当前日期:", current_date) # 打印当前星期 current_weekday = datetime.now().strftime("%A") print("当前星期:", current_weekday) # 检查是否有节日信息 if data: holiday_name = data[0]['name'] print("节日:", holiday_name) else: print("今天没有节日")
The text was updated successfully, but these errors were encountered:
No branches or pull requests
希望改进发送time,同时发送时间,日期,星期,节假日
下面是我用gpt生成的可能的代码
The text was updated successfully, but these errors were encountered: