OPL_DateTime.3 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. .TH "OPL::DateTime" 3 "Tue Aug 9 2022" "openPilotLog" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. OPL::DateTime
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .SS "Static Public Member Functions"
  10. .in +1c
  11. .ti -1c
  12. .RI "static QString \fBdateToString\fP (const QDate &date, \fBOPL::DateFormat\fP format=OPL::DateFormat::ISODate)"
  13. .br
  14. .RI "Reimplements QDate::toString to accept OPL::Date::DateFormat enums\&. "
  15. .ti -1c
  16. .RI "static QDate \fBparseInput\fP (QString &user_input, \fBOPL::DateFormat\fP format)"
  17. .br
  18. .RI "takes a user-provided input and tries to convert it to a (valid) QDate\&. "
  19. .ti -1c
  20. .RI "static void \fBtryToFix\fP (QString &user_input, \fBOPL::DateFormat\fP format)"
  21. .br
  22. .ti -1c
  23. .RI "static void \fBpadCentury\fP (QString &io_user_input, \fBOPL::DateFormat\fP format)"
  24. .br
  25. .RI "padCentury adds the century to a date where it was omitted "
  26. .ti -1c
  27. .RI "static void \fBpadZeroes\fP (QString &io_user_input)"
  28. .br
  29. .RI "pads a user-provided date string with 0s to facilitate conversion to QDate "
  30. .ti -1c
  31. .RI "static void \fBaddSeperators\fP (QString &io_user_input, const \fBOPL::DateFormat\fP &format)"
  32. .br
  33. .ti -1c
  34. .RI "static bool \fBcontainsSeperator\fP (const QString &user_input)"
  35. .br
  36. .ti -1c
  37. .RI "static const QStringList & \fBgetDisplayNames\fP ()"
  38. .br
  39. .ti -1c
  40. .RI "static const QString \fBgetFormatString\fP (\fBOPL::DateFormat\fP format)"
  41. .br
  42. .ti -1c
  43. .RI "static const QString \fBcurrentDate\fP ()"
  44. .br
  45. .RI "today Returns a string containing the current date in ISO format "
  46. .ti -1c
  47. .RI "static const QString \fBdateTimeToString\fP (const QDateTime &date_time, OPL::DateTimeFormat format)"
  48. .br
  49. .RI "dateTimeToString formats a QDateTime object into a string in a uniform way\&. "
  50. .ti -1c
  51. .RI "static QDateTime \fBfromString\fP (const QString &date_time_string)"
  52. .br
  53. .in -1c
  54. .SS "Static Public Attributes"
  55. .in +1c
  56. .ti -1c
  57. .RI "static const QString \fBISO_FORMAT_STRING\fP = QStringLiteral('yyyy\-MM\-dd')"
  58. .br
  59. .ti -1c
  60. .RI "static const QString \fBDE_FORMAT_STRING\fP = QStringLiteral('dd\&.MM\&.yyyy')"
  61. .br
  62. .ti -1c
  63. .RI "static const QString \fBEN_FORMAT_STRING\fP = QStringLiteral('MM/dd/yyyy')"
  64. .br
  65. .ti -1c
  66. .RI "static const QMap< \fBOPL::DateFormat\fP, QString > \fBDATEFORMATSMAP\fP"
  67. .br
  68. .ti -1c
  69. .RI "static const QStringList \fBDISPLAY_NAMES\fP"
  70. .br
  71. .in -1c
  72. .SH "Member Function Documentation"
  73. .PP
  74. .SS "const QString OPL::DateTime::currentDate ()\fC [static]\fP"
  75. .PP
  76. today Returns a string containing the current date in ISO format
  77. .PP
  78. \fBReturns\fP
  79. .RS 4
  80. .RE
  81. .PP
  82. .SS "static const QString OPL::DateTime::dateTimeToString (const QDateTime & date_time, OPL::DateTimeFormat format)\fC [inline]\fP, \fC [static]\fP"
  83. .PP
  84. dateTimeToString formats a QDateTime object into a string in a uniform way\&.
  85. .PP
  86. \fBReturns\fP
  87. .RS 4
  88. .RE
  89. .PP
  90. .SS "QDate OPL::DateTime::parseInput (QString & user_input, \fBOPL::DateFormat\fP format)\fC [static]\fP"
  91. .PP
  92. takes a user-provided input and tries to convert it to a (valid) QDate\&.
  93. .PP
  94. \fBReturns\fP
  95. .RS 4
  96. QDate (invalid if input not recognized)
  97. .RE
  98. .PP
  99. .SH "Member Data Documentation"
  100. .PP
  101. .SS "const QMap<\fBOPL::DateFormat\fP, QString> OPL::DateTime::DATEFORMATSMAP\fC [inline]\fP, \fC [static]\fP"
  102. \fBInitial value:\fP
  103. .PP
  104. .nf
  105. = {
  106. {OPL::DateFormat::ISODate, ISO_FORMAT_STRING},
  107. {OPL::DateFormat::DE, DE_FORMAT_STRING },
  108. {OPL::DateFormat::EN, EN_FORMAT_STRING },
  109. }
  110. .fi
  111. .SS "const QStringList OPL::DateTime::DISPLAY_NAMES\fC [inline]\fP, \fC [static]\fP"
  112. \fBInitial value:\fP
  113. .PP
  114. .nf
  115. = {
  116. QStringLiteral("ISO 8601: yyyy-MM-dd"),
  117. QStringLiteral("DE: dd\&.MM\&.yyyy"),
  118. QStringLiteral("EN: MM/dd/yyyy")
  119. }
  120. .fi
  121. .SH "Author"
  122. .PP
  123. Generated automatically by Doxygen for openPilotLog from the source code\&.