ibireme / YYKit

A collection of iOS components.
MIT License
13.99k stars 3.69k forks source link

Date的isLeapYear实现貌似有问题 #26

Closed JianboYan closed 8 years ago

JianboYan commented 8 years ago

闰年计算方法: 1、年份能被4整除; 2、年份若是100的整数倍的话,需被400整除,否则是平年。

但是实现是

JianboYan commented 8 years ago

之前提的 YYKitMacro里面的issue貌似不见了 static inline void dispatch_async_on_main_queue(void (^block)()) { if (pthread_main_np()) { block(); // 直接回调应该是同步的吧? } else { dispatch_async(dispatch_get_main_queue(), block); }

ibireme commented 8 years ago

闰年那个是有。。我改一下~

另外那个 Issue 在这里:https://github.com/ibireme/YYKit/issues/25

ibireme commented 8 years ago

Fixed~ https://github.com/ibireme/YYKit/commit/3f2e045acda70dc140ec8cf0d14cc37692210559