summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/snippets/code/src_corelib_tools_qdatetime.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename snippet files to match the carved up corelib/tools/Edward Welbourne2020-06-041-218/+0
| | | | | | | | | | | This is a folllow-up to commits 548513a4bd050d3df0a85fed6e2d1a00ce06d2ab and a9aa206b7b8ac4e69f8c46233b4080e00e845ff5, renaming the snippets files referenced by the files moved out of corelib/tools/ to match the new locations of the files using them. Change-Id: I59f5d3c217ef835e9244387cc769e7212de9d8f5 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add startOfDay() and endOfDay() methods to QDateEdward Welbourne2019-04-241-1/+1
| | | | | | | | | | | | | | | | | | | These methods give the first and last QDateTime values in the given day, for a given time-zone or time-spec. These are usually the relevant midnight, or the millisecond before, except when time-zone transitions (typically DST changes) skip it, when care is needed to select the right moment. Adapted some code to make use of the new API, eliminating some old cruft from qdatetimeparser_p.h in the process. [ChangeLog][QtCore][QDate] Added startOfDay() and endOfDay() methods to provide a QDateTime at the start and end of a given date, taking account of any time skipped by transitions, e.g. a DST spring-forward, which can lead to a day starting at 01:00 or ending just before 23:00. Task-number: QTBUG-64485 Change-Id: I3dd7a34bedfbec8f8af00c43d13f50f99346ecd0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Unify license header usage.Jani Heikkinen2016-03-291-3/+13
| | | | | | | | | Update files using old header.LGPL3 to header.LGPL Update files using old FDL template to use new one Update files using old BSD template to use new one Change-Id: I36a78272516f9953d02956522f285b40adfc8915 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Updated BSD licensed file headersJani Heikkinen2015-02-151-3/+3
| | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-5/+5
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Clarify how two digit years are parsed by QDateTime::fromString().Mitch Curtis2013-01-031-1/+15
| | | | | | | | | | It's currently not obvious that two digit years will always be in the 20th century (1900's). Task-number: QTBUG-28797 Change-Id: I7dee9a46e0cb803a8f097debc5443d1789c2f16c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-6/+6
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Clarify QDateTime documentation re timeSpec conversion.Mitch Curtis2012-09-031-1/+36
| | | | | | | | | Clarify the documentation for setTimeSpec, toTimeSpec, toUTC and toLocalTime, to be clear on which ones return the same point in time, and which one simply changes the timezone. Change-Id: Ic47dd8876ea733f1df0f64eca5bdf00d04f8d0d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clarify how days are counted in QDateTime::daysTo documentation.Mitch Curtis2012-08-081-0/+13
| | | | | | | | | Mention that the days are counted as the amount of times midnight is reached between the start and end date. Task-number: QTBUG-26780 Change-Id: I22ff6c56b748ac968d6991e0be3e10905c0634bd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-191-0/+146
This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>