From 537cd2cbdff683b27a0979775027c4bb5562e3a2 Mon Sep 17 00:00:00 2001 From: Asuro Date: Sun, 26 Mar 2023 22:35:30 +0200 Subject: [PATCH] tooltip time format --- AsuroTool/AsuroTool.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/AsuroTool/AsuroTool.cpp b/AsuroTool/AsuroTool.cpp index f5a44ef..968136c 100644 --- a/AsuroTool/AsuroTool.cpp +++ b/AsuroTool/AsuroTool.cpp @@ -163,9 +163,7 @@ void draw(DrawData& drawData, ApplicationData& appData) if (appData.hoverTargetType == HoverTargetType::HOVER_TARGET_CHECKLIST_DAY) { ImGui::BeginTooltip(); - char timeStr[32]; - snprintf(timeStr, _countof(timeStr), "%02u.%02u", unsigned int{ appData.hoverTargetDay.day() }, unsigned int{ appData.hoverTargetDay.month() }); - ImGui::Text(timeStr); + ImGui::Text(std::format("{:%a, %d.%m}", std::chrono::sys_days{ appData.hoverTargetDay }).c_str()); ImGui::EndTooltip(); } }