date - iOS 时间计算,月数间隔
怪我咯
怪我咯 2017-04-17 17:14:10
0
3
511

iOS开发中如何获取某三个月之间的秒数,主要现在有个需求,要得到个时间间隔,要求起始时间为现在的时间点,终止时间为某些月后的这个时间点。有没有什么方法,难道必须要做判断吗,什么闰月之类的!!!

iOS是否有原生的方法啊?T__T

怪我咯
怪我咯

走同样的路,发现不同的人生

Antworte allen(3)
PHPzhong

要获得某个月后的这个时间点苹果没有原生的方法。Github上有开源的帮助日期计算的库
https://github.com/DanisFabric/DateSuger 你可以去看看

刘奇

NSCalendar

迷茫

给你推荐一个在开源库中常用的时间处理库——DateTools,几乎可以能完成你所想要的所有。
如果有兴趣,可以参考下,里面是怎么实现的。
github地址:https://github.com/MatthewYork/DateTools

Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!