iOS开发中如何获取某三个月之间的秒数,主要现在有个需求,要得到个时间间隔,要求起始时间为现在的时间点,终止时间为某些月后的这个时间点。有没有什么方法,难道必须要做判断吗,什么闰月之类的!!!
iOS是否有原生的方法啊?T__T
PHPz2017-04-17 17:16:10
There is no native method from Apple to get this time point after a certain month. There is an open source library on Github that helps with date calculation
https://github.com/DanisFabric/DateSuger You can check it out
迷茫2017-04-17 17:16:10
I would like to recommend you a commonly used time processing library in open source libraries - DateTools, which can accomplish almost everything you want.
If you are interested, you can refer to how it is implemented.
github address: https://github.com/MatthewYork/DateTools