10月 31 python 获取本周和上周的周数 Posted on 2013 年 10 月 31 日 by 张 子萌 >>> import time >>> time.strftime(‘%Y%U’,time.localtime(time.time())) ‘201343’ >>> time.strftime(‘%Y%U’,time.localtime(time.time()-3600*24*7)) ‘201342’