[docs] Add QDate and QDateTime details to overview of C++20 features

Briefly sketch the new features in std::chrono and how Qt now provides
access to them.

Task-number: QTBUG-128837
Change-Id: I99a94ac9d0ed292ec9e3b0057ba6a9e2092200ed
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 856aaa4c0c4992b3be57c0a6c5ccb81dd6ea8b86)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Edward Welbourne 2024-11-05 14:26:57 +01:00 committed by Qt Cherry-pick Bot
parent 0a258409ef
commit 459f1978ae

View File

@ -11,4 +11,24 @@
provide a better experience for our users.
This page gives a brief overview of C++20 features available in Qt.
\section1 Support for \c{std::chrono}
Various classes related to date and time have support for \l
{https://en.cppreference.com/w/cpp/chrono} {std::chrono} features from older
versions of C++. With the arrival of C++20, \c{std::chrono} has added new \l
{https://en.cppreference.com//w/cpp/chrono#Calendar} {calendar types}, such
as \l {https://en.cppreference.com/w/cpp/chrono/year_month_day}
{year_month_day}, plus \l
{https://en.cppreference.com//w/cpp/chrono#Time_point} {date and time
representations}, such as the \l
{https://en.cppreference.com/w/cpp/chrono/system_clock} {system_clock} and
its \l {https://en.cppreference.com/w/cpp/chrono/time_point} {time_point}
types. When Qt is built with C++20, it can now make use of these additions.
QDate and QDateTime now support conversion to and from the various calendar,
date and date-time types, along with addition of \l
{https://en.cppreference.com/w/cpp/chrono/duration} {duration
types}. QTimeZone now supports construction from a \l
{https://en.cppreference.com/w/cpp/chrono/time_zone} {time_zone}.
*/