Skip to content
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

Implemented fmt::day, fmt::month, fmt::year and related unit tests #3906

Merged
merged 17 commits into from
Mar 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix weekday::c_encoding return value
  • Loading branch information
zivshek committed Mar 25, 2024
commit 5c46fb1e9f9cb2d511c2f185f9898ec390cd1631
2 changes: 1 addition & 1 deletion include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -2049,7 +2049,7 @@ class weekday {
weekday() = default;
explicit constexpr weekday(unsigned int wd) noexcept
zivshek marked this conversation as resolved.
Show resolved Hide resolved
: value(static_cast<unsigned char>(wd != 7 ? wd : 0)) {}
constexpr auto c_encoding() const noexcept -> unsigned char { return value; }
constexpr auto c_encoding() const noexcept -> unsigned int { return value; }
};

class day {
Expand Down