aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/qml/qmldate.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/qml/qmldate.qdoc')
-rw-r--r--doc/src/qml/qmldate.qdoc92
1 files changed, 46 insertions, 46 deletions
diff --git a/doc/src/qml/qmldate.qdoc b/doc/src/qml/qmldate.qdoc
index 7ac200db46..696d97ba1d 100644
--- a/doc/src/qml/qmldate.qdoc
+++ b/doc/src/qml/qmldate.qdoc
@@ -36,9 +36,9 @@
Functions that accept a locale format may be either an enumeration
value:
\table
- \row \i Locale.LongFormat \i The long version of the string; for example, returning "January" as a month name.
- \row \i Locale.ShortFormat \i The short version of the string; for example, returning "Jan" as a month name.
- \row \i Locale.NarrowFormat \i A special version for use when space is limited;
+ \row \li Locale.LongFormat \li The long version of the string; for example, returning "January" as a month name.
+ \row \li Locale.ShortFormat \li The short version of the string; for example, returning "Jan" as a month name.
+ \row \li Locale.NarrowFormat \li A special version for use when space is limited;
for example, returning "J" as a month name. Note that the narrow format might contain
the same text for different months and days or it can even be an empty string if the
locale doesn't support narrow names, so you should avoid using it for date formatting.
@@ -47,21 +47,21 @@
or a string specifying the format These expressions may be used for format dates:
\table
- \header \i Expression \i Output
- \row \i d \i the day as number without a leading zero (1 to 31)
- \row \i dd \i the day as number with a leading zero (01 to 31)
- \row \i ddd
- \i the abbreviated localized day name (e.g. 'Mon' to 'Sun').
- \row \i dddd
- \i the long localized day name (e.g. 'Monday' to 'Sunday').
- \row \i M \i the month as number without a leading zero (1 to 12)
- \row \i MM \i the month as number with a leading zero (01 to 12)
- \row \i MMM
- \i the abbreviated localized month name (e.g. 'Jan' to 'Dec').
- \row \i MMMM
- \i the long localized month name (e.g. 'January' to 'December').
- \row \i yy \i the year as two digit number (00 to 99)
- \row \i yyyy \i the year as four digit number. If the year is negative,
+ \header \li Expression \li Output
+ \row \li d \li the day as number without a leading zero (1 to 31)
+ \row \li dd \li the day as number with a leading zero (01 to 31)
+ \row \li ddd
+ \li the abbreviated localized day name (e.g. 'Mon' to 'Sun').
+ \row \li dddd
+ \li the long localized day name (e.g. 'Monday' to 'Sunday').
+ \row \li M \li the month as number without a leading zero (1 to 12)
+ \row \li MM \li the month as number with a leading zero (01 to 12)
+ \row \li MMM
+ \li the abbreviated localized month name (e.g. 'Jan' to 'Dec').
+ \row \li MMMM
+ \li the long localized month name (e.g. 'January' to 'December').
+ \row \li yy \li the year as two digit number (00 to 99)
+ \row \li yyyy \li the year as four digit number. If the year is negative,
a minus sign is prepended in addition.
\endtable
@@ -74,35 +74,35 @@
1969):
\table
- \header \o Format \o Result
- \row \o dd.MM.yyyy \o 20.07.1969
- \row \o ddd MMMM d yy \o Sun July 20 69
- \row \o 'The day is' dddd \o The day is Sunday
+ \header \li Format \li Result
+ \row \li dd.MM.yyyy \li 20.07.1969
+ \row \li ddd MMMM d yy \li Sun July 20 69
+ \row \li 'The day is' dddd \li The day is Sunday
\endtable
These expressions may be used for formatting time:
\table
- \header \i Expression \i Output
- \row \i h
- \i the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)
- \row \i hh
- \i the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)
- \row \i H
- \i the hour without a leading zero (0 to 23, even with AM/PM display)
- \row \i HH
- \i the hour with a leading zero (00 to 23, even with AM/PM display)
- \row \i m \i the minute without a leading zero (0 to 59)
- \row \i mm \i the minute with a leading zero (00 to 59)
- \row \i s \i the second without a leading zero (0 to 59)
- \row \i ss \i the second with a leading zero (00 to 59)
- \row \i z \i the milliseconds without leading zeroes (0 to 999)
- \row \i zzz \i the milliseconds with leading zeroes (000 to 999)
- \row \i AP or A
- \i use AM/PM display. \e AP will be replaced by either "AM" or "PM".
- \row \i ap or a
- \i use am/pm display. \e ap will be replaced by either "am" or "pm".
- \row \i t \i the timezone (for example "CEST")
+ \header \li Expression \li Output
+ \row \li h
+ \li the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)
+ \row \li hh
+ \li the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)
+ \row \li H
+ \li the hour without a leading zero (0 to 23, even with AM/PM display)
+ \row \li HH
+ \li the hour with a leading zero (00 to 23, even with AM/PM display)
+ \row \li m \li the minute without a leading zero (0 to 59)
+ \row \li mm \li the minute with a leading zero (00 to 59)
+ \row \li s \li the second without a leading zero (0 to 59)
+ \row \li ss \li the second with a leading zero (00 to 59)
+ \row \li z \li the milliseconds without leading zeroes (0 to 999)
+ \row \li zzz \li the milliseconds with leading zeroes (000 to 999)
+ \row \li AP or A
+ \li use AM/PM display. \e AP will be replaced by either "AM" or "PM".
+ \row \li ap or a
+ \li use am/pm display. \e ap will be replaced by either "am" or "pm".
+ \row \li t \li the timezone (for example "CEST")
\endtable
All other input characters will be ignored. Any sequence of characters that
@@ -113,10 +113,10 @@
Example format strings (assuming that the QTime is 14:13:09.042)
\table
- \header \i Format \i Result
- \row \i hh:mm:ss.zzz \i 14:13:09.042
- \row \i h:m:s ap \i 2:13:9 pm
- \row \i H:m:s a \i 14:13:9 pm
+ \header \li Format \li Result
+ \row \li hh:mm:ss.zzz \li 14:13:09.042
+ \row \li h:m:s ap \li 2:13:9 pm
+ \row \li H:m:s a \li 14:13:9 pm
\endtable
If the date is invalid, an empty string will be returned.