标签:get pytho pre size import python ret 计算 datetime
import datetime
def get_week_day(date):
week_day = {
0: ‘星期一‘,
1: ‘星期二‘,
2: ‘星期三‘,
3: ‘星期四‘,
4: ‘星期五‘,
5: ‘星期六‘,
6: ‘星期日‘,
}
day = date.weekday() #weekday()可以获得是星期几
return week_day[day]
print(datetime.datetime.now())
print(get_week_day(datetime.datetime.now()))
标签:get pytho pre size import python ret 计算 datetime
原文地址:http://www.cnblogs.com/zgsxh/p/6094095.html