From 57a1c2b0d94304b24d8ca9a49ecd5033ff9fc43a Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 31 Jan 2023 14:20:13 +0100 Subject: [PATCH] Correct an inaccurate comment in inDateTimeRange() Change-Id: I43bf3bf448792bfac05dccb8b57047b264dfb269 Reviewed-by: Thiago Macieira --- src/corelib/time/qdatetime.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp index 44e195ec98d..fdd2aa77935 100644 --- a/src/corelib/time/qdatetime.cpp +++ b/src/corelib/time/qdatetime.cpp @@ -836,7 +836,8 @@ static bool inDateTimeRange(qint64 jd, bool start) jd -= JULIAN_DAY_FOR_EPOCH; const qint64 maxDay = Bounds::max() / MSECS_PER_DAY; const qint64 minDay = Bounds::min() / MSECS_PER_DAY - 1; - // (Divisions rounded towards zero, as MSECS_PER_DAY has factors other than two.) + // (Divisions rounded towards zero, as MSECS_PER_DAY is even - so doesn't + // divide max() - and has factors other than two, so doesn't divide min().) // Range includes start of last day and end of first: if (start) return jd > minDay && jd <= maxDay;