Did you ever have to compute a week-day out of calendar date, or compute what date is the last Sunday of August this year? Recently, I came across a very interesting paper on the topic, by Howard Hinnant. It provides a set of very useful, efficient and clever date manipulation algorithms, along a very thorough discussion of how they work. I just couldn’t help sharing this with everyone. Here is the link: “
chrono-Compatible Low-Level Date Algorithms”.
On a similar topic, on the same website you can find the proposal and reference implementation for
chrono::date by the same author.