2011-12-02 52 views

回答

6

使用datetime.timedelta

import datetime 
target_date = datetime.date(2011,2,7) 

delta = datetime.timedelta(days=2) 
new_date = target_date - delta 

print new_date # 2011-02-05