Python中时间的处理之——timedelta篇
摘要:
#! /usr/bin/python# coding=utf-8from datetime import datetime,timedelta"""timedelta代表两个datetime之间的时间差"""now = datetime.now()past = past = datetime(2010,11,12,13,14,15,16)timespan = now - past#这会得到一个负数past - nowattrs = [("days","日"),( 'seconds' 阅读全文
posted @ 2011-11-06 22:50 Goodspeed 阅读(56149) 评论(0) 推荐(1) 编辑