-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
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
Green Day Support #3758
Comments
Looking at this, not only day(), but also month() and year(). It seems they do not have a formatter. Adding a custom formatter does fix it, but should we support it? If we want to, where is the best place to define them? |
The C++ standard mentions these formatters (https://eel.is/c++draft/time): template<class charT> struct formatter<chrono::day, charT>;
template<class charT> struct formatter<chrono::month, charT>;
template<class charT> struct formatter<chrono::year, charT>; |
in chrono.h, it defined the formatters for weekday, duration, time_point, etc., putting the defines for day, month, and year there works. I'll do some clean ups. |
you're right, std should have those formatters, It's interesting, as C++ 20 supports formatting all the chrono types, why you had to define the formatters for duration, weekday etc. in fmt in the first place? I think the issue is to make fmt make use the std::formatter's. |
Good question. |
Also |
{fmt} doesn't support printing green day at the moment:
Error:
The text was updated successfully, but these errors were encountered: