123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330 |
- <!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.9.1"/>
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
- <title>openPilotLog: OPL::DateTime 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" />
- <link href="custom_dark_theme.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="projectlogo"><img alt="Logo" src="icon_main.png"/></td>
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">openPilotLog
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.9.1 -->
- <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','.html');
- /* @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_o_p_l_1_1_date_time.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-static-methods">Static Public Member Functions</a> |
- <a href="#pub-static-attribs">Static Public Attributes</a> |
- <a href="class_o_p_l_1_1_date_time-members.html">List of all members</a> </div>
- <div class="headertitle">
- <div class="title">OPL::DateTime Class Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <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:ae4c63618854365d1a1d6d8fc2d231f1a"><td class="memItemLeft" align="right" valign="top"><a id="ae4c63618854365d1a1d6d8fc2d231f1a"></a>
- static QString </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_date_time.html#ae4c63618854365d1a1d6d8fc2d231f1a">dateToString</a> (const QDate &date, <a class="el" href="namespace_o_p_l.html#af7cd691b5d236d3e846193464e9cba28">OPL::DateFormat</a> format=OPL::DateFormat::ISODate)</td></tr>
- <tr class="memdesc:ae4c63618854365d1a1d6d8fc2d231f1a"><td class="mdescLeft"> </td><td class="mdescRight">Reimplements QDate::toString to accept OPL::Date::DateFormat enums. <br /></td></tr>
- <tr class="separator:ae4c63618854365d1a1d6d8fc2d231f1a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a8995f51a618ce5411930209889b7fbef"><td class="memItemLeft" align="right" valign="top">static QDate </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_date_time.html#a8995f51a618ce5411930209889b7fbef">parseInput</a> (QString &user_input, <a class="el" href="namespace_o_p_l.html#af7cd691b5d236d3e846193464e9cba28">OPL::DateFormat</a> format)</td></tr>
- <tr class="memdesc:a8995f51a618ce5411930209889b7fbef"><td class="mdescLeft"> </td><td class="mdescRight">takes a user-provided input and tries to convert it to a (valid) QDate. <a href="class_o_p_l_1_1_date_time.html#a8995f51a618ce5411930209889b7fbef">More...</a><br /></td></tr>
- <tr class="separator:a8995f51a618ce5411930209889b7fbef"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae5f4c61186ef46bd37e21a2fe29075ef"><td class="memItemLeft" align="right" valign="top"><a id="ae5f4c61186ef46bd37e21a2fe29075ef"></a>
- static void </td><td class="memItemRight" valign="bottom"><b>tryToFix</b> (QString &user_input, <a class="el" href="namespace_o_p_l.html#af7cd691b5d236d3e846193464e9cba28">OPL::DateFormat</a> format)</td></tr>
- <tr class="separator:ae5f4c61186ef46bd37e21a2fe29075ef"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa845df34fc308820472e1fe3aff29589"><td class="memItemLeft" align="right" valign="top"><a id="aa845df34fc308820472e1fe3aff29589"></a>
- static void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_date_time.html#aa845df34fc308820472e1fe3aff29589">padCentury</a> (QString &io_user_input, <a class="el" href="namespace_o_p_l.html#af7cd691b5d236d3e846193464e9cba28">OPL::DateFormat</a> format)</td></tr>
- <tr class="memdesc:aa845df34fc308820472e1fe3aff29589"><td class="mdescLeft"> </td><td class="mdescRight">padCentury adds the century to a date where it was omitted <br /></td></tr>
- <tr class="separator:aa845df34fc308820472e1fe3aff29589"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a552680c8122a61f360456eb998e13654"><td class="memItemLeft" align="right" valign="top"><a id="a552680c8122a61f360456eb998e13654"></a>
- static void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_date_time.html#a552680c8122a61f360456eb998e13654">padZeroes</a> (QString &io_user_input)</td></tr>
- <tr class="memdesc:a552680c8122a61f360456eb998e13654"><td class="mdescLeft"> </td><td class="mdescRight">pads a user-provided date string with 0s to facilitate conversion to QDate <br /></td></tr>
- <tr class="separator:a552680c8122a61f360456eb998e13654"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a125f4ce49fb296b4ae11ef37a58fd19a"><td class="memItemLeft" align="right" valign="top"><a id="a125f4ce49fb296b4ae11ef37a58fd19a"></a>
- static void </td><td class="memItemRight" valign="bottom"><b>addSeperators</b> (QString &io_user_input, const <a class="el" href="namespace_o_p_l.html#af7cd691b5d236d3e846193464e9cba28">OPL::DateFormat</a> &format)</td></tr>
- <tr class="separator:a125f4ce49fb296b4ae11ef37a58fd19a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a978b17acd0fe7c9d78a4d8cc80f8549a"><td class="memItemLeft" align="right" valign="top"><a id="a978b17acd0fe7c9d78a4d8cc80f8549a"></a>
- static bool </td><td class="memItemRight" valign="bottom"><b>containsSeperator</b> (const QString &user_input)</td></tr>
- <tr class="separator:a978b17acd0fe7c9d78a4d8cc80f8549a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:acf4b1b4a1fe780c619a2681b12d636af"><td class="memItemLeft" align="right" valign="top"><a id="acf4b1b4a1fe780c619a2681b12d636af"></a>
- static const QStringList & </td><td class="memItemRight" valign="bottom"><b>getDisplayNames</b> ()</td></tr>
- <tr class="separator:acf4b1b4a1fe780c619a2681b12d636af"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ac058e8fdd3083af129f1c15f728457e4"><td class="memItemLeft" align="right" valign="top"><a id="ac058e8fdd3083af129f1c15f728457e4"></a>
- static const QString </td><td class="memItemRight" valign="bottom"><b>getFormatString</b> (<a class="el" href="namespace_o_p_l.html#af7cd691b5d236d3e846193464e9cba28">OPL::DateFormat</a> format)</td></tr>
- <tr class="separator:ac058e8fdd3083af129f1c15f728457e4"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:add36917b3d13e4a2bb3f8dbac7973da6"><td class="memItemLeft" align="right" valign="top">static const QString </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_date_time.html#add36917b3d13e4a2bb3f8dbac7973da6">currentDate</a> ()</td></tr>
- <tr class="memdesc:add36917b3d13e4a2bb3f8dbac7973da6"><td class="mdescLeft"> </td><td class="mdescRight">today Returns a string containing the current date in ISO format <a href="class_o_p_l_1_1_date_time.html#add36917b3d13e4a2bb3f8dbac7973da6">More...</a><br /></td></tr>
- <tr class="separator:add36917b3d13e4a2bb3f8dbac7973da6"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae225c8c48918ca8aba36383028cad2d0"><td class="memItemLeft" align="right" valign="top">static const QString </td><td class="memItemRight" valign="bottom"><a class="el" href="class_o_p_l_1_1_date_time.html#ae225c8c48918ca8aba36383028cad2d0">dateTimeToString</a> (const QDateTime &date_time, OPL::DateTimeFormat format)</td></tr>
- <tr class="memdesc:ae225c8c48918ca8aba36383028cad2d0"><td class="mdescLeft"> </td><td class="mdescRight">dateTimeToString formats a QDateTime object into a string in a uniform way. <a href="class_o_p_l_1_1_date_time.html#ae225c8c48918ca8aba36383028cad2d0">More...</a><br /></td></tr>
- <tr class="separator:ae225c8c48918ca8aba36383028cad2d0"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a80fdd62f613508a912e6a256c84d69b0"><td class="memItemLeft" align="right" valign="top"><a id="a80fdd62f613508a912e6a256c84d69b0"></a>
- static QDateTime </td><td class="memItemRight" valign="bottom"><b>fromString</b> (const QString &date_time_string)</td></tr>
- <tr class="separator:a80fdd62f613508a912e6a256c84d69b0"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
- Static Public Attributes</h2></td></tr>
- <tr class="memitem:a981f251a919997bb66356e799ef9595a"><td class="memItemLeft" align="right" valign="top"><a id="a981f251a919997bb66356e799ef9595a"></a>
- static const QString </td><td class="memItemRight" valign="bottom"><b>ISO_FORMAT_STRING</b> = QStringLiteral("yyyy-MM-dd")</td></tr>
- <tr class="separator:a981f251a919997bb66356e799ef9595a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aed09853be4856e6a1d7533ff506d7d49"><td class="memItemLeft" align="right" valign="top"><a id="aed09853be4856e6a1d7533ff506d7d49"></a>
- static const QString </td><td class="memItemRight" valign="bottom"><b>DE_FORMAT_STRING</b> = QStringLiteral("dd.MM.yyyy")</td></tr>
- <tr class="separator:aed09853be4856e6a1d7533ff506d7d49"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a5d278737724ca68acc7cae3aa7bfdb72"><td class="memItemLeft" align="right" valign="top"><a id="a5d278737724ca68acc7cae3aa7bfdb72"></a>
- static const QString </td><td class="memItemRight" valign="bottom"><b>EN_FORMAT_STRING</b> = QStringLiteral("MM/dd/yyyy")</td></tr>
- <tr class="separator:a5d278737724ca68acc7cae3aa7bfdb72"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a0c7b56bdd6473f80803ea9dc2e0e57a1"><td class="memItemLeft" align="right" valign="top">static const QMap< <a class="el" href="namespace_o_p_l.html#af7cd691b5d236d3e846193464e9cba28">OPL::DateFormat</a>, QString > </td><td class="memItemRight" valign="bottom"><b>DATEFORMATSMAP</b></td></tr>
- <tr class="separator:a0c7b56bdd6473f80803ea9dc2e0e57a1"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a204fca9792a9f545b975e11f6d514487"><td class="memItemLeft" align="right" valign="top">static const QStringList </td><td class="memItemRight" valign="bottom"><b>DISPLAY_NAMES</b></td></tr>
- <tr class="separator:a204fca9792a9f545b975e11f6d514487"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <h2 class="groupheader">Member Function Documentation</h2>
- <a id="add36917b3d13e4a2bb3f8dbac7973da6"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#add36917b3d13e4a2bb3f8dbac7973da6">◆ </a></span>currentDate()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">const QString OPL::DateTime::currentDate </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>today Returns a string containing the current date in ISO format </p>
- <dl class="section return"><dt>Returns</dt><dd></dd></dl>
- </div>
- </div>
- <a id="ae225c8c48918ca8aba36383028cad2d0"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#ae225c8c48918ca8aba36383028cad2d0">◆ </a></span>dateTimeToString()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">static const QString OPL::DateTime::dateTimeToString </td>
- <td>(</td>
- <td class="paramtype">const QDateTime & </td>
- <td class="paramname"><em>date_time</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">OPL::DateTimeFormat </td>
- <td class="paramname"><em>format</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">inline</span><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>dateTimeToString formats a QDateTime object into a string in a uniform way. </p>
- <dl class="section return"><dt>Returns</dt><dd></dd></dl>
- </div>
- </div>
- <a id="a8995f51a618ce5411930209889b7fbef"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a8995f51a618ce5411930209889b7fbef">◆ </a></span>parseInput()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">QDate OPL::DateTime::parseInput </td>
- <td>(</td>
- <td class="paramtype">QString & </td>
- <td class="paramname"><em>user_input</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="namespace_o_p_l.html#af7cd691b5d236d3e846193464e9cba28">OPL::DateFormat</a> </td>
- <td class="paramname"><em>format</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>takes a user-provided input and tries to convert it to a (valid) QDate. </p>
- <dl class="section return"><dt>Returns</dt><dd>QDate (invalid if input not recognized) </dd></dl>
- </div>
- </div>
- <h2 class="groupheader">Member Data Documentation</h2>
- <a id="a0c7b56bdd6473f80803ea9dc2e0e57a1"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a0c7b56bdd6473f80803ea9dc2e0e57a1">◆ </a></span>DATEFORMATSMAP</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">const QMap<<a class="el" href="namespace_o_p_l.html#af7cd691b5d236d3e846193464e9cba28">OPL::DateFormat</a>, QString> OPL::DateTime::DATEFORMATSMAP</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <b>Initial value:</b><div class="fragment"><div class="line">= {</div>
- <div class="line"> {OPL::DateFormat::ISODate, ISO_FORMAT_STRING},</div>
- <div class="line"> {OPL::DateFormat::DE, DE_FORMAT_STRING },</div>
- <div class="line"> {OPL::DateFormat::EN, EN_FORMAT_STRING },</div>
- <div class="line"> </div>
- <div class="line"> }</div>
- </div><!-- fragment -->
- </div>
- </div>
- <a id="a204fca9792a9f545b975e11f6d514487"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a204fca9792a9f545b975e11f6d514487">◆ </a></span>DISPLAY_NAMES</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">const QStringList OPL::DateTime::DISPLAY_NAMES</td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <b>Initial value:</b><div class="fragment"><div class="line">= {</div>
- <div class="line"> QStringLiteral(<span class="stringliteral">"ISO 8601: yyyy-MM-dd"</span>),</div>
- <div class="line"> QStringLiteral(<span class="stringliteral">"DE: dd.MM.yyyy"</span>),</div>
- <div class="line"> QStringLiteral(<span class="stringliteral">"EN: MM/dd/yyyy"</span>)</div>
- <div class="line"> }</div>
- </div><!-- fragment -->
- </div>
- </div>
- <hr/>The documentation for this class was generated from the following files:<ul>
- <li>src/functions/<a class="el" href="datetime_8h_source.html">datetime.h</a></li>
- <li>src/functions/datetime.cpp</li>
- </ul>
- </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="namespace_o_p_l.html">OPL</a></li><li class="navelem"><a class="el" href="class_o_p_l_1_1_date_time.html">DateTime</a></li>
- <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
- </ul>
- </div>
- </body>
- </html>
|