mysterioustrousers / MTDates

A thread safe date calculation library with all the date functions you'll ever need.
BSD 2-Clause "Simplified" License
343 stars 68 forks source link

Use NSCalendarUnitWeekOfYear #41

Closed yas375 closed 10 years ago

yas375 commented 10 years ago

Unfortunately I can't prove it with unit tests (see #34). But with old api I was getting incorrect result in the project I'm working on.

2014-10-03_1148

And with the fix proposed here everything is good to me :)

2014-10-03_1154

atomkirk commented 10 years ago

looks like NSCalendarUnitWeekOfYear was added in 10.9. Verify that for me. If you add a requirement to of OS X 10.9 (and whatever iOS version this was added) to the podspec, I'll merge and push a pod update. thanks.

yas375 commented 10 years ago

Adam, according to Apple's header files NSCalendarUnitWeekOfYear available since OS X 10.7 and iOS 5.0

2014-10-04_0837