I am writing a class for holding dates in c++, and I found the following problem:
I have a number of days N
since a reference date (in
Why are you reinventing dates?
Date math is well understood. The standard C library (that's right, C, not just C++) has had date functions for many years.
As other's have indicated the boost date classes are also well designed and easy to use.
When searching for an answer, the first question should be, is the problem already solved. This problem has been solved for many years.