import time:时间模块
time.time():返回一个距1970年的时间戳
time.localtime():返回当地时间:
time.timezone():返回系统当前时区:
time.sleep(10) #睡眠10秒
time.gmtime():当系统当前时间换算为标准时间
tm_xxxx:要获取当前的时间等:
time.mktime():将时间元组转换成时间函数。
time.strftime():将元组格式转换为自定义的字符串
time.strptime():将日期格式的字符串转换成元组。
time.asctime():以固定日期格式输出
time.ctime():以固定的日期格输出
datetime.timedelta(3):时间的加减函数
==============================日历(Calendar)模块 =============================
1、calendar.calendar(theyear=2020,w=2,l=1,c=6):w:每一天的间隔距离,c:每个月的间隔距离,l:每个星期为一行
calendar.isleap(year):判断某一年是否是闰年
calendar.leapdays(y1,y2): 判断两个年限之前有多少个闰年
calendar.month(year,month,w=2,l=1):打印某一年某一月的日历
calendar.monthrange(year,month):返回两个参数,第一个是当月的第一天是星期几+1,第二个是当月有多少天。
calendar.weekday(year,month,day):返回某年某月某日是星期几。