From de65d3c0295894f8eafc4c7582dfe180dc58c81e Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Mon, 20 Jan 2025 19:25:18 -0500 Subject: add upstream 14.0, depends on wx 3.3.0 --- zen/time.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'zen/time.h') diff --git a/zen/time.h b/zen/time.h index aa7df21b..11bfeb1a 100644 --- a/zen/time.h +++ b/zen/time.h @@ -60,7 +60,7 @@ TimeComp parseTime(const String& format, const String2& str); //similar to ::str //---------------------------------------------------------------------------------------------------------------------------------- //format: [-][[d.]HH:]MM:SS e.g. -1.23:45:67 -Zstring formatTimeSpan(int64_t timeInSec, bool hourOptional = false); +Zstring formatTimeSpan(int64_t timeInSec, bool hourRequired = true); @@ -389,7 +389,7 @@ TimeComp parseTime(const String& format, const String2& str) inline -Zstring formatTimeSpan(int64_t timeInSec, bool hourOptional) +Zstring formatTimeSpan(int64_t timeInSec, bool hourRequired) { Zstring timespanStr; @@ -400,7 +400,7 @@ Zstring formatTimeSpan(int64_t timeInSec, bool hourOptional) } //check *before* subtracting days! - const Zchar* timeSpanFmt = hourOptional && timeInSec < 3600 ? Zstr("%M:%S") : formatIsoTimeTag; + const Zchar* timeSpanFmt = timeInSec < 3600 && !hourRequired ? Zstr("%M:%S") : formatIsoTimeTag; const int secsPerDay = 24 * 3600; const int64_t days = numeric::intDivFloor(timeInSec, secsPerDay); -- cgit