123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta name="generator" content="Doxygen 1.8.20"/>
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
- <title>Qwt User's Guide: QwtDate Class Reference</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="dynsections.js"></script>
- <link href="navtree.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="resize.js"></script>
- <script type="text/javascript" src="navtreedata.js"></script>
- <script type="text/javascript" src="navtree.js"></script>
- <link href="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="search/searchdata.js"></script>
- <script type="text/javascript" src="search/search.js"></script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">Qwt User's Guide
-  <span id="projectnumber">6.1.6</span>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.20 -->
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- /* @license-end */
- </script>
- <script type="text/javascript" src="menudata.js"></script>
- <script type="text/javascript" src="menu.js"></script>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(function() {
- initMenu('',true,false,'search.php','Search');
- $(document).ready(function() { init_search(); });
- });
- /* @license-end */</script>
- <div id="main-nav"></div>
- </div><!-- top -->
- <div id="side-nav" class="ui-resizable side-nav-resizable">
- <div id="nav-tree">
- <div id="nav-tree-contents">
- <div id="nav-sync" class="sync"></div>
- </div>
- </div>
- <div id="splitbar" style="-moz-user-select:none;"
- class="ui-resizable-handle">
- </div>
- </div>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(document).ready(function(){initNavTree('class_qwt_date.html',''); initResizable(); });
- /* @license-end */
- </script>
- <div id="doc-content">
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- </div>
- <!-- iframe showing the search results (closed by default) -->
- <div id="MSearchResultsWindow">
- <iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
- </iframe>
- </div>
- <div class="header">
- <div class="summary">
- <a href="#pub-types">Public Types</a> |
- <a href="#pub-static-methods">Static Public Member Functions</a> |
- <a href="class_qwt_date-members.html">List of all members</a> </div>
- <div class="headertitle">
- <div class="title">QwtDate Class Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <p>A collection of methods around date/time values.
- <a href="class_qwt_date.html#details">More...</a></p>
- <p><code>#include <<a class="el" href="qwt__date_8h_source.html">qwt_date.h</a>></code></p>
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
- Public Types</h2></td></tr>
- <tr class="memitem:ab915db512c556a4666ada4fbfccfce1e"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1e">Week0Type</a> { <a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1ea82971cd90d670fe3048ad8c377379c1d">FirstThursday</a>,
- <a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1eab5c50b8108f8c4535201c0c590a598d6">FirstDay</a>
- }</td></tr>
- <tr class="separator:ab915db512c556a4666ada4fbfccfce1e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ad037b999a51cae4d9ab36bf8e7859587"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587">IntervalType</a> { <br />
-   <a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587a4e1d45d6382c27689a30adc11186d4f1">Millisecond</a>,
- <a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587aabaf7a7d45288a33590f61fe075b3590">Second</a>,
- <a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587a7c9073c66b2628adbe772ac4c1a678ef">Minute</a>,
- <a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587a8e7a2f91f89423e446bfdaa1e01ebd2f">Hour</a>,
- <br />
-   <a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587a1d503616cab082a9c741be881cc0a813">Day</a>,
- <a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587ae204b4e8ce8679ba9ac378e41bd77b2b">Week</a>,
- <a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587a0ab43f35f1bdbae7536be2be0455700a">Month</a>,
- <a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587ae306523ed94ccf930afb811ff7a735ab">Year</a>
- <br />
- }</td></tr>
- <tr class="separator:ad037b999a51cae4d9ab36bf8e7859587"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:af636fffdebea2e4463fc32461b1217e0"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <a class="el" href="class_qwt_date.html#af636fffdebea2e4463fc32461b1217e0aed8ee8f3dbc5b7a5e953b3ec51a79108">JulianDayForEpoch</a> = 2440588
- }</td></tr>
- <tr class="separator:af636fffdebea2e4463fc32461b1217e0"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
- Static Public Member Functions</h2></td></tr>
- <tr class="memitem:a9ab1845543957472c2c6529ad03ef98d"><td class="memItemLeft" align="right" valign="top">static QDate </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#a9ab1845543957472c2c6529ad03ef98d">minDate</a> ()</td></tr>
- <tr class="separator:a9ab1845543957472c2c6529ad03ef98d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:af82ba26011550602f1adb61da53bd830"><td class="memItemLeft" align="right" valign="top">static QDate </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#af82ba26011550602f1adb61da53bd830">maxDate</a> ()</td></tr>
- <tr class="separator:af82ba26011550602f1adb61da53bd830"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a8039dc115458981fc1c7fc2c0aa8d053"><td class="memItemLeft" align="right" valign="top">static QDateTime </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#a8039dc115458981fc1c7fc2c0aa8d053">toDateTime</a> (double value, Qt::TimeSpec=Qt::UTC)</td></tr>
- <tr class="separator:a8039dc115458981fc1c7fc2c0aa8d053"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:afce10fd70f7a1ecac3f97776fb2dc46a"><td class="memItemLeft" align="right" valign="top">static double </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#afce10fd70f7a1ecac3f97776fb2dc46a">toDouble</a> (const QDateTime &)</td></tr>
- <tr class="separator:afce10fd70f7a1ecac3f97776fb2dc46a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ab4d7b043971e13a97a8b5f9edb5eee02"><td class="memItemLeft" align="right" valign="top">static QDateTime </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#ab4d7b043971e13a97a8b5f9edb5eee02">ceil</a> (const QDateTime &, <a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587">IntervalType</a>)</td></tr>
- <tr class="separator:ab4d7b043971e13a97a8b5f9edb5eee02"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a1b350f22a57b44b529bc4de740dbe213"><td class="memItemLeft" align="right" valign="top">static QDateTime </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#a1b350f22a57b44b529bc4de740dbe213">floor</a> (const QDateTime &, <a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587">IntervalType</a>)</td></tr>
- <tr class="separator:a1b350f22a57b44b529bc4de740dbe213"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:abb91fb441a254337d5445ad4bab1a662"><td class="memItemLeft" align="right" valign="top">static QDate </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#abb91fb441a254337d5445ad4bab1a662">dateOfWeek0</a> (int year, <a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1e">Week0Type</a>)</td></tr>
- <tr class="memdesc:abb91fb441a254337d5445ad4bab1a662"><td class="mdescLeft"> </td><td class="mdescRight">Date of the first day of the first week for a year. <a href="class_qwt_date.html#abb91fb441a254337d5445ad4bab1a662">More...</a><br /></td></tr>
- <tr class="separator:abb91fb441a254337d5445ad4bab1a662"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a90dd1f9dc38565c003f8e1ef821965b7"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#a90dd1f9dc38565c003f8e1ef821965b7">weekNumber</a> (const QDate &, <a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1e">Week0Type</a>)</td></tr>
- <tr class="separator:a90dd1f9dc38565c003f8e1ef821965b7"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aeadce3496f631eae3a7e54749078c7a4"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#aeadce3496f631eae3a7e54749078c7a4">utcOffset</a> (const QDateTime &)</td></tr>
- <tr class="separator:aeadce3496f631eae3a7e54749078c7a4"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2c19998281321ba078d717f7f9ec6855"><td class="memItemLeft" align="right" valign="top">static QString </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_date.html#a2c19998281321ba078d717f7f9ec6855">toString</a> (const QDateTime &, const QString &format, <a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1e">Week0Type</a>)</td></tr>
- <tr class="separator:a2c19998281321ba078d717f7f9ec6855"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <div class="textblock"><p>A collection of methods around date/time values. </p>
- <p>Qt offers convenient classes for dealing with date/time values, but Qwt uses coordinate systems that are based on doubles. <a class="el" href="class_qwt_date.html" title="A collection of methods around date/time values.">QwtDate</a> offers methods to translate from QDateTime to double and v.v.</p>
- <p>A double is interpreted as the number of milliseconds since 1970-01-01T00:00:00 Universal Coordinated Time - also known as "The Epoch".</p>
- <p>While the range of the Julian day in Qt4 is limited to [0, MAX_INT], Qt5 stores it as qint64 offering a huge range of valid dates. As the significance of a double is below this ( assuming a fraction of 52 bits ) the translation is not bijective with rounding errors for dates very far from Epoch. For a resolution of 1 ms those start to happen for dates above the year 144683.</p>
- <p>An axis for a date/time interval is expected to be aligned and divided in time/date units like seconds, minutes, ... <a class="el" href="class_qwt_date.html" title="A collection of methods around date/time values.">QwtDate</a> offers several algorithms that are needed to calculate these axes.</p>
- <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_date_scale_engine.html" title="A scale engine for date/time values.">QwtDateScaleEngine</a>, <a class="el" href="class_qwt_date_scale_draw.html" title="A class for drawing datetime scales.">QwtDateScaleDraw</a>, QDate, QTime </dd></dl>
- </div><h2 class="groupheader">Member Enumeration Documentation</h2>
- <a id="af636fffdebea2e4463fc32461b1217e0"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#af636fffdebea2e4463fc32461b1217e0">◆ </a></span>anonymous enum</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">anonymous enum</td>
- </tr>
- </table>
- </div><div class="memdoc">
- <table class="fieldtable">
- <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="af636fffdebea2e4463fc32461b1217e0aed8ee8f3dbc5b7a5e953b3ec51a79108"></a>JulianDayForEpoch </td><td class="fielddoc"><p>The Julian day of "The Epoch". </p>
- </td></tr>
- </table>
- </div>
- </div>
- <a id="ad037b999a51cae4d9ab36bf8e7859587"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#ad037b999a51cae4d9ab36bf8e7859587">◆ </a></span>IntervalType</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">enum <a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587">QwtDate::IntervalType</a></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Classification of an time interval</p>
- <p>Time intervals needs to be classified to decide how to align and divide it. </p>
- <table class="fieldtable">
- <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ad037b999a51cae4d9ab36bf8e7859587a4e1d45d6382c27689a30adc11186d4f1"></a>Millisecond </td><td class="fielddoc"><p>The interval is related to milliseconds. </p>
- </td></tr>
- <tr><td class="fieldname"><a id="ad037b999a51cae4d9ab36bf8e7859587aabaf7a7d45288a33590f61fe075b3590"></a>Second </td><td class="fielddoc"><p>The interval is related to seconds. </p>
- </td></tr>
- <tr><td class="fieldname"><a id="ad037b999a51cae4d9ab36bf8e7859587a7c9073c66b2628adbe772ac4c1a678ef"></a>Minute </td><td class="fielddoc"><p>The interval is related to minutes. </p>
- </td></tr>
- <tr><td class="fieldname"><a id="ad037b999a51cae4d9ab36bf8e7859587a8e7a2f91f89423e446bfdaa1e01ebd2f"></a>Hour </td><td class="fielddoc"><p>The interval is related to hours. </p>
- </td></tr>
- <tr><td class="fieldname"><a id="ad037b999a51cae4d9ab36bf8e7859587a1d503616cab082a9c741be881cc0a813"></a>Day </td><td class="fielddoc"><p>The interval is related to days. </p>
- </td></tr>
- <tr><td class="fieldname"><a id="ad037b999a51cae4d9ab36bf8e7859587ae204b4e8ce8679ba9ac378e41bd77b2b"></a>Week </td><td class="fielddoc"><p>The interval is related to weeks. </p>
- </td></tr>
- <tr><td class="fieldname"><a id="ad037b999a51cae4d9ab36bf8e7859587a0ab43f35f1bdbae7536be2be0455700a"></a>Month </td><td class="fielddoc"><p>The interval is related to months. </p>
- </td></tr>
- <tr><td class="fieldname"><a id="ad037b999a51cae4d9ab36bf8e7859587ae306523ed94ccf930afb811ff7a735ab"></a>Year </td><td class="fielddoc"><p>The interval is related to years. </p>
- </td></tr>
- </table>
- </div>
- </div>
- <a id="ab915db512c556a4666ada4fbfccfce1e"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#ab915db512c556a4666ada4fbfccfce1e">◆ </a></span>Week0Type</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">enum <a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1e">QwtDate::Week0Type</a></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>How to identify the first week of year differs between countries. </p>
- <table class="fieldtable">
- <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ab915db512c556a4666ada4fbfccfce1ea82971cd90d670fe3048ad8c377379c1d"></a>FirstThursday </td><td class="fielddoc"><p>According to ISO 8601 the first week of a year is defined as "the week with the year's first Thursday in it".</p>
- <p>FirstThursday corresponds to the numbering that is implemented in QDate::weekNumber(). </p>
- </td></tr>
- <tr><td class="fieldname"><a id="ab915db512c556a4666ada4fbfccfce1eab5c50b8108f8c4535201c0c590a598d6"></a>FirstDay </td><td class="fielddoc"><p>"The week with January 1.1 in it."</p>
- <p>In the U.S. this definition is more common than FirstThursday. </p>
- </td></tr>
- </table>
- </div>
- </div>
- <h2 class="groupheader">Member Function Documentation</h2>
- <a id="ab4d7b043971e13a97a8b5f9edb5eee02"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#ab4d7b043971e13a97a8b5f9edb5eee02">◆ </a></span>ceil()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">QDateTime QwtDate::ceil </td>
- <td>(</td>
- <td class="paramtype">const QDateTime & </td>
- <td class="paramname"><em>dateTime</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587">IntervalType</a> </td>
- <td class="paramname"><em>intervalType</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Ceil a datetime according the interval type</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">dateTime</td><td>Datetime value </td></tr>
- <tr><td class="paramname">intervalType</td><td>Interval type, how to ceil. F.e. when intervalType = QwtDate::Months, the result will be ceiled to the next beginning of a month </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>Ceiled datetime </dd></dl>
- <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_date.html#a1b350f22a57b44b529bc4de740dbe213">floor()</a> </dd></dl>
- </div>
- </div>
- <a id="abb91fb441a254337d5445ad4bab1a662"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#abb91fb441a254337d5445ad4bab1a662">◆ </a></span>dateOfWeek0()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">QDate QwtDate::dateOfWeek0 </td>
- <td>(</td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>year</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1e">Week0Type</a> </td>
- <td class="paramname"><em>type</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Date of the first day of the first week for a year. </p>
- <p>The first day of a week depends on the current locale ( QLocale::firstDayOfWeek() ).</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">year</td><td>Year </td></tr>
- <tr><td class="paramname">type</td><td>Option how to identify the first week </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>First day of week 0</dd></dl>
- <dl class="section see"><dt>See also</dt><dd>QLocale::firstDayOfWeek(), <a class="el" href="class_qwt_date.html#a90dd1f9dc38565c003f8e1ef821965b7">weekNumber()</a> </dd></dl>
- </div>
- </div>
- <a id="a1b350f22a57b44b529bc4de740dbe213"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a1b350f22a57b44b529bc4de740dbe213">◆ </a></span>floor()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">QDateTime QwtDate::floor </td>
- <td>(</td>
- <td class="paramtype">const QDateTime & </td>
- <td class="paramname"><em>dateTime</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="class_qwt_date.html#ad037b999a51cae4d9ab36bf8e7859587">IntervalType</a> </td>
- <td class="paramname"><em>intervalType</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Floor a datetime according the interval type</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">dateTime</td><td>Datetime value </td></tr>
- <tr><td class="paramname">intervalType</td><td>Interval type, how to ceil. F.e. when intervalType = QwtDate::Months, the result will be ceiled to the next beginning of a month </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>Floored datetime </dd></dl>
- <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_date.html#a1b350f22a57b44b529bc4de740dbe213">floor()</a> </dd></dl>
- </div>
- </div>
- <a id="af82ba26011550602f1adb61da53bd830"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#af82ba26011550602f1adb61da53bd830">◆ </a></span>maxDate()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">QDate QwtDate::maxDate </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Maximum for the supported date range</p>
- <p>The range of valid dates depends on how QDate stores the Julian day internally.</p>
- <ul>
- <li>For Qt4 it is "Tue Jun 3 5874898"</li>
- <li>For Qt5 it is "Tue Dec 31 2147483647"</li>
- </ul>
- <dl class="section return"><dt>Returns</dt><dd>maximum of the date range </dd></dl>
- <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_date.html#a9ab1845543957472c2c6529ad03ef98d">minDate()</a> </dd></dl>
- <dl class="section note"><dt>Note</dt><dd>The maximum differs between Qt4 and Qt5 </dd></dl>
- </div>
- </div>
- <a id="a9ab1845543957472c2c6529ad03ef98d"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a9ab1845543957472c2c6529ad03ef98d">◆ </a></span>minDate()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">QDate QwtDate::minDate </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Minimum for the supported date range</p>
- <p>The range of valid dates depends on how QDate stores the Julian day internally.</p>
- <ul>
- <li>For Qt4 it is "Tue Jan 2 -4713"</li>
- <li>For Qt5 it is "Thu Jan 1 -2147483648"</li>
- </ul>
- <dl class="section return"><dt>Returns</dt><dd>minimum of the date range </dd></dl>
- <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_date.html#af82ba26011550602f1adb61da53bd830">maxDate()</a> </dd></dl>
- </div>
- </div>
- <a id="a8039dc115458981fc1c7fc2c0aa8d053"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a8039dc115458981fc1c7fc2c0aa8d053">◆ </a></span>toDateTime()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">QDateTime QwtDate::toDateTime </td>
- <td>(</td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>value</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">Qt::TimeSpec </td>
- <td class="paramname"><em>timeSpec</em> = <code>Qt::UTC</code> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Translate from double to QDateTime</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">value</td><td>Number of milliseconds since the epoch, 1970-01-01T00:00:00 UTC </td></tr>
- <tr><td class="paramname">timeSpec</td><td>Time specification </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>Datetime value</dd></dl>
- <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_date.html#afce10fd70f7a1ecac3f97776fb2dc46a">toDouble()</a>, QDateTime::setMSecsSinceEpoch() </dd></dl>
- <dl class="section note"><dt>Note</dt><dd>The return datetime for Qt::OffsetFromUTC will be Qt::UTC </dd></dl>
- </div>
- </div>
- <a id="afce10fd70f7a1ecac3f97776fb2dc46a"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#afce10fd70f7a1ecac3f97776fb2dc46a">◆ </a></span>toDouble()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">double QwtDate::toDouble </td>
- <td>(</td>
- <td class="paramtype">const QDateTime & </td>
- <td class="paramname"><em>dateTime</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Translate from QDateTime to double</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">dateTime</td><td>Datetime value </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>Number of milliseconds since 1970-01-01T00:00:00 UTC has passed.</dd></dl>
- <dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qwt_date.html#a8039dc115458981fc1c7fc2c0aa8d053">toDateTime()</a>, QDateTime::toMSecsSinceEpoch() </dd></dl>
- <dl class="section warning"><dt>Warning</dt><dd>For values very far below or above 1970-01-01 UTC rounding errors will happen due to the limited significance of a double. </dd></dl>
- </div>
- </div>
- <a id="a2c19998281321ba078d717f7f9ec6855"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a2c19998281321ba078d717f7f9ec6855">◆ </a></span>toString()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">QString QwtDate::toString </td>
- <td>(</td>
- <td class="paramtype">const QDateTime & </td>
- <td class="paramname"><em>dateTime</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const QString & </td>
- <td class="paramname"><em>format</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1e">Week0Type</a> </td>
- <td class="paramname"><em>week0Type</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Translate a datetime into a string</p>
- <p>Beside the format expressions documented in QDateTime::toString() the following expressions are supported:</p>
- <ul>
- <li>w<br />
- week number: ( 1 - 53 )</li>
- <li>ww<br />
- week number with a leading zero ( 01 - 53 )</li>
- </ul>
- <p>As week 1 usually starts in the previous year a special rule is applied for formats, where the year is expected to match the week number - even if the date belongs to the previous year.</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">dateTime</td><td>Datetime value </td></tr>
- <tr><td class="paramname">format</td><td>Format string </td></tr>
- <tr><td class="paramname">week0Type</td><td>Specification of week 0</td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>Datetime string </dd></dl>
- <dl class="section see"><dt>See also</dt><dd>QDateTime::toString(), <a class="el" href="class_qwt_date.html#a90dd1f9dc38565c003f8e1ef821965b7">weekNumber()</a>, <a class="el" href="class_qwt_date_scale_draw.html" title="A class for drawing datetime scales.">QwtDateScaleDraw</a> </dd></dl>
- </div>
- </div>
- <a id="aeadce3496f631eae3a7e54749078c7a4"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#aeadce3496f631eae3a7e54749078c7a4">◆ </a></span>utcOffset()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">int QwtDate::utcOffset </td>
- <td>(</td>
- <td class="paramtype">const QDateTime & </td>
- <td class="paramname"><em>dateTime</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Offset in seconds from Coordinated Universal Time</p>
- <p>The offset depends on the time specification of dateTime:</p>
- <ul>
- <li>Qt::UTC 0, dateTime has no offset</li>
- <li>Qt::OffsetFromUTC returns dateTime.utcOffset()</li>
- <li>Qt::LocalTime: number of seconds from the UTC</li>
- </ul>
- <p>For Qt::LocalTime the offset depends on the timezone and daylight savings.</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">dateTime</td><td>Datetime value </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>Offset in seconds </dd></dl>
- </div>
- </div>
- <a id="a90dd1f9dc38565c003f8e1ef821965b7"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a90dd1f9dc38565c003f8e1ef821965b7">◆ </a></span>weekNumber()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">int QwtDate::weekNumber </td>
- <td>(</td>
- <td class="paramtype">const QDate & </td>
- <td class="paramname"><em>date</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1e">Week0Type</a> </td>
- <td class="paramname"><em>type</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Find the week number of a date</p>
- <ul>
- <li><a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1ea82971cd90d670fe3048ad8c377379c1d">QwtDate::FirstThursday</a><br />
- Corresponding to ISO 8601 ( see QDate::weekNumber() ).</li>
- <li><a class="el" href="class_qwt_date.html#ab915db512c556a4666ada4fbfccfce1eab5c50b8108f8c4535201c0c590a598d6">QwtDate::FirstDay</a><br />
- Number of weeks that have begun since <a class="el" href="class_qwt_date.html#abb91fb441a254337d5445ad4bab1a662" title="Date of the first day of the first week for a year.">dateOfWeek0()</a>.</li>
- </ul>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">date</td><td>Date </td></tr>
- <tr><td class="paramname">type</td><td>Option how to identify the first week</td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>Week number, starting with 1 </dd></dl>
- </div>
- </div>
- </div><!-- contents -->
- </div><!-- doc-content -->
- <!-- start footer part -->
- <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
- <ul>
- <li class="navelem"><a class="el" href="class_qwt_date.html">QwtDate</a></li>
- <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
- </ul>
- </div>
- </body>
- </html>
|