I was wondering about one thing. I'm reworking on an older project of mine that utilises the header <time.h> and I'm intending on learning about using more recent C++ (so here I'm looking into the <chrono> header)
However, with the research I've done for displaying time with only using <chrono> people always use the function localtime() which requires <ctime> or <time.h>, is there any way of doing without it?
Thanks JLBorges for that info, I didn't know there was a C++20 yet haha.
Is there no way of doing it with earlier versions (I'm currently using VS 19 and that option doesn't work, it says namespace std::chrono doesn't have a member function 'sys_time') ?
EDIT: I can't use std::chrono::local_time() either
I see, thank you for the ressource on Hinnant's date library.
One last question if I may, since you're mentioning C++20 I assume there is a way to use it. Is there - to your knowledge - any possible way to use it with VS 19, or VS in general?
As per the compiler status page on cppreference, no compiler/library currently supports C++20 calendar and time zone facilities (clang++/libc++ has partial support). https://en.cppreference.com/w/cpp/compiler_support
Well have you personally had it work with VS? I included /std::c++latest yet it still doesn't work. RIP. I guess I'll have to stick with that sucky time.h workaround for now...