From d49daa3f2737be5c5cbdae3e6b1b2651489a0686 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 28 Aug 2019 15:39:56 +0200 Subject: [PATCH] Clarify documentation of daysInMonth() Change-Id: I86258512c33cabec8d11ff3c794934f40850e413 Reviewed-by: Paul Wicking --- src/corelib/time/qcalendar.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/corelib/time/qcalendar.cpp b/src/corelib/time/qcalendar.cpp index 2044b37cea..4d3f1627b5 100644 --- a/src/corelib/time/qcalendar.cpp +++ b/src/corelib/time/qcalendar.cpp @@ -221,8 +221,8 @@ QString QCalendar::name() const Calendars with intercallary days may represent these as extra days of the preceding month, or as short months separate from the usual ones. In the former case, daysInMonth(month, year) should be the number of ordinary days - in the month, although \c{isDateValid(year, month, day)} might return \c true for - some larger values of \c day. + in the month, although \c{isDateValid(year, month, day)} might return \c true + for some larger values of \c day. \sa daysInYear(), monthsInYear(), minimumDaysInMonth(), maximumDaysInMonth() */ @@ -725,7 +725,8 @@ QCalendar::QCalendar(QStringView name) Returns the number of days in the given \a month of the given \a year. Months are numbered consecutively, starting with 1 for the first month of each - year. + year. If \a year is \c Unspecified (its default, if not passed), the month's + length in a normal year is returned. \sa maximumDaysInMonth(), minimumDaysInMonth() */