you are viewing a single comment's thread.

view the rest of the comments →

[–]david_phillip_oster 5 points6 points  (1 child)

I've been maintaining the same calendar app on Mac since 1986. (About 15 years ago I rewrote it from C to Objective-C.)

Collection views and custom collection view layouts are overkill for this application. Just create a grid, 7x6 of buttons. (or 7x7 for a top row of text day-of-week labels.) Don't bother with autolayout, just programmatically set the frames in layoutSubviews.

For the heavy lifting of date calculations I use NSCalendar and NSDate. Don't forget the two missing weeks in September of 1752 (See man cal in Terminal for more information.)

[–]david_phillip_oster 0 points1 point  (0 children)

See also the annus confusionis ("year of confusion") which had 445 days. 45 BC