pyhton 月份和天数的计算

http://stackoverflow.com/questions/546321/how-do-i-calculate-the-date-six-months-from-the-current-date-using-the-datetime

一直想怎么写个简洁的代码来实现,月份或天数的计算。用datetime可以轻松实现天数的计算,完全不用考虑闰年闰月的情况,就是不能实现月份的计算,今天终于找到了一个很好的文档。。。

1.计算月份

2.计算天数


 

posted @ 2015-07-29 21:02  defuliudefu  阅读(268)  评论(0编辑  收藏  举报