aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/calendar/qquickcalendar.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-10-04 20:05:44 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-10-04 18:16:17 +0000
commit99bbe5643b293aaad7b7ccb299989f62b8f6dced (patch)
tree8cfe617ef72f6a9021d5f4ff9449c426bc9f6659 /src/imports/calendar/qquickcalendar.cpp
parent6eab7d10aa34b6a76cbd46a6af703d6c6fa77ca5 (diff)
Calendar: improve the documentation about 0-based month numbers
Change-Id: Ibcd36070b6652ca9c5033265af4415daaba4b3ef Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/calendar/qquickcalendar.cpp')
-rw-r--r--src/imports/calendar/qquickcalendar.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/imports/calendar/qquickcalendar.cpp b/src/imports/calendar/qquickcalendar.cpp
index 198c4527..5a14bb27 100644
--- a/src/imports/calendar/qquickcalendar.cpp
+++ b/src/imports/calendar/qquickcalendar.cpp
@@ -48,6 +48,26 @@ QT_BEGIN_NAMESPACE
The Calendar singleton provides miscellaneous calendar related
utilities.
+ The Qt Labs Calendar module uses 0-based month numbers to be consistent
+ with the JavaScript Date type, that is used by the QML language. This
+ means that \c Date::getMonth() can be assigned to MonthGrid::month and
+ WeekNumberColumn::month as is. When dealing with dealing with month numbers
+ diretly, it is highly recommended to use the following enumeration values
+ to avoid confusion.
+
+ \value Calendar.January January (0)
+ \value Calendar.February February (1)
+ \value Calendar.March March (2)
+ \value Calendar.April April (3)
+ \value Calendar.May May (4)
+ \value Calendar.June June (5)
+ \value Calendar.July July (6)
+ \value Calendar.August August (7)
+ \value Calendar.September September (8)
+ \value Calendar.October October (9)
+ \value Calendar.November November (10)
+ \value Calendar.December December (11)
+
\sa MonthGrid, DayOfWeekRow, WeekNumberColumn
*/