Optimize %F in tm formatting

This commit is contained in:
Victor Zverovich
2021-09-10 07:33:45 -07:00
parent 1aa98f8b93
commit 67cb2dad37
2 changed files with 51 additions and 3 deletions

View File

@@ -48,6 +48,7 @@ TEST(chrono_test, format_tm) {
tm.tm_sec = 33;
EXPECT_EQ(fmt::format("The date is {:%Y-%m-%d %H:%M:%S}.", tm),
"The date is 2016-04-25 11:22:33.");
EXPECT_EQ(fmt::format("{:%F}", tm), "2016-04-25");
}
TEST(chrono_test, grow_buffer) {