470,564 Members | 2,348 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,564 developers. It's quick & easy.

Why is C++ so terrible when it comes to date/time manipulation?

3 2Bits
This is just a rant, but I love C++, and its such a massive and influential language, but why is it that while most other major programming languages have nice, convenient built in libraries for things like parsing a datetime string, or printing a datetime as a string (even C has strftime and related functions), with the STL we have to wait until C++20 before anybody even considers adding date and time functionality to chrono (and who knows if that will actually be any good)? I'm not even talking about timezones. I will be developing some project, having a great time, and then all of a sudden there is a need (a quite common need) for manipulating or generating timestamps, and my heart will sink.

And once again I do what it seems like virtually everybody else does, I run crying to our date and time Lord and Savior Howard Hinnant, without whom we would be lost forever.

Seriously, that guy is the crutch for damn near the entire C++ world when it comes to date and time. I really don't get why there is such a gaping hole in the STL here.
Feb 14 '21 #1
1 1551
9,208 Expert Mod 8TB
You are not supposed to use the STL as a production library. The STL contains only basic stuff to get you started. It's for students learning C or C++. Many places don't use the STL at all and instead have purhased (or written) their own library.

Look at cell formatting in Microsoft EXCEL and you will see what I mean. Date handling is its own library.
Feb 14 '21 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Marcus | last post: by
21 posts views Thread by Javier | last post: by
1 post views Thread by E. Liepins | last post: by
7 posts views Thread by Jerome | last post: by
17 posts views Thread by Franc Zabkar | last post: by
21 posts views Thread by rdemyan via AccessMonster.com | last post: by
2 posts views Thread by Darhl Thomason | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.