python 时间处理
2013-01-31 14:57
204 查看
def lastweek(curr_date):
yearS=curr_date[0:4]
monthS=curr_date[4:6]
dayS=curr_date[6:8]
stat_date=date(int(yearS), int(monthS), int(dayS))
week=date.strftime(stat_date, '%W')
if(week==0):
lastYearDay=date(stat_date.year()-1,'12','31')
if(date.)
date.strftime(stat_date,'%W')
yearS=curr_date[0:4]
monthS=curr_date[4:6]
dayS=curr_date[6:8]
stat_date=date(int(yearS), int(monthS), int(dayS))
week=date.strftime(stat_date, '%W')
if(week==0):
lastYearDay=date(stat_date.year()-1,'12','31')
if(date.)
date.strftime(stat_date,'%W')
相关文章推荐
- python时间处理
- Python - time 时间处理
- Python零碎知识(10):对日期时间的处理
- Python中时间的处理之——timedelta篇
- Python3 - 时间处理与定时任务
- Python中基本的日期时间处理的学习教程
- python时间格式处理
- Python实用日期时间处理方法汇总
- Python 对于时间的处理
- Python 处理时间差
- Python urllib2 设置超时时间并处理超时异常
- python时间处理之datetime
- python os.path模块/Python os.listdir/字符串处理/python 时间datetime.datetime
- Python 处理日期时间——Arrow库
- python时间处理详解
- Python中对时间日期的处理方法简单汇总
- Python 日期时间处理
- python很好用的时间处理包 Arrow
- python datetime处理时间
- Python中时间的处理之——Time篇