last day (15 days later) » 

7:41 PM
Hey
 
Hi. The algorithms at howardhinnant.github.io/date_algorithms.html are public domain.
Also, which algorithm there are you interested in? It may already be wrapped up in the date library with nicer syntax.
 
I don't know which algorithms I'll need yet. I'm working on a building automation system that will schedule things according to recurring patterns (the 3rd of every month, every Sunday, etc).
 
Ok. The date lib wraps things like that with syntax along the lines of:
auto ymd = 3_d/m/y;
Or
auto ymd = sun[1]/m/y; // first sunday of the month and year.
At any rate, if there's some date manipulation thing you want to do, feel free to ask how to do it in my date library. If it isn't already there, I'll show you how to do it, and maybe consider adding it.
Are you on VS by any chance? I'm still working on getting ported to VS.
 
Hmm, perhaps that's all I need for my app. I'll reconsider using it.

No I'm on Linux and cross-compiling to an embedded ARM Linux target. Hence my concerns regarding time_t.
I'll retract my comment about the "lack of date manupulation algorithms".
 
Then you're good to go. I'm ported to gcc-5.2.0. I haven't tried earlier than that, but don't anticipate any problems. No Y2038 problems unless you specifically ask for seconds in a int32_t. By default seconds will be in an int64_t from your chrono lib.
No problem. Easy to misunderstand a brand new lib.
 
7:51 PM
Is the lib using any c++14 features? I'm limited to C+11 only.
 
Yes. It heavily depends on C++14 constexpr rules for doing date calculations at compile time. However it will auto-port to C++11. You will loose the capability to do computations at compile-time, but otherwise remain fully functional.
 
That's fine.
Thanks for the info. I hope your lib gets adopted into C++1y! Proper date handling is sorely lacking in C++.
 
Signing off. Feel free to ping me by email if you have any questions. You can get my email from my name on the paper.
 

last day (15 days later) »