We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std::basic_ostream supports the new std::put_time function.
std::basic_ostream
std::put_time
I am not surprised since this is not the classic << overload as according to the documentation: http://en.cppreference.com/w/cpp/io/manip/put_time.
<<
Not sure if cppformat should support it, but it would be nice.
The text was updated successfully, but these errors were encountered:
Good idea. It should be possible to do something like:
std::time_t t = std::time(nullptr); std::tm tm = *std::localtime(&t); fmt::print("{:%c %Z}", tm);
with a custom formatting function.
Sorry, something went wrong.
Time formatting has been implemented in fa5ebd2. Here's an example:
#include "fmt/time.h" std::time_t t = std::time(nullptr); fmt::print("The date is {:%Y-%m-%d}.", *std::localtime(&t));
This just needs to be documented.
Done: http://fmtlib.net/dev/api.html#date-and-time-formatting
No branches or pull requests
std::basic_ostream
supports the newstd::put_time
function.I am not surprised since this is not the classic
<<
overload as according to the documentation: http://en.cppreference.com/w/cpp/io/manip/put_time.Not sure if cppformat should support it, but it would be nice.
The text was updated successfully, but these errors were encountered: