NSDateComponents.quater is returning 0 instead of valid quater count.
I googled and it is said it is a bug for apple found in 2012. However, now it is 2015 and iOS 8.3, bug still exists.
for example:
unitFlags = NSQuarterCalendarUnit;
(lldb) po firstDate
2009-12-31 16:00:00 +0000
(lldb) po lastDate
2013-09-30 16:00:00 +0000
(lldb) po [gregorian components:unitFlags fromDate:firstDate toDate:lastDate options:0];
<NSDateComponents: 0x170158b50>
Quarter: 0
Aucun commentaire:
Enregistrer un commentaire