如何获取明天的日期

1.

>>> from datetime import date,timedelta
>>> today = date.today()

>>> tomorrow = today + timedelta(1)
>>> print(today,tomorrow)
2012-09-19 2012-09-20

 

2.

 

  1. import datetime
  2. today = datetime.date.today( )
  3. tomorrow = today + datetime.timedelta(days=1)
  4. print tomorrow;

你可能感兴趣的:(日期)