MatthewYork / DateTools

Dates and times made easy in iOS
MIT License
7.22k stars 952 forks source link

Unit method from Date+Components extension not working #275

Closed zvjerka24 closed 4 years ago

zvjerka24 commented 5 years ago

If you try to get number of days in month, response is nil

example: Date().unit(of: Calendar.Component.day, in: Calendar.Component.month)

MatthewYork commented 4 years ago

The unit tests began to fail because it appears the calendar component hashes are no longer reliable for this calculation. I am deprecating the unit function and removing unit tests until it may be re-implemented without relying on hashing.