Date Algorithms

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.

This entry was posted in programming and tagged . Bookmark the permalink.

3 Responses to Date Algorithms

  1. Updated link (TWC pulled the plug on my personal website):

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.