kaddressbook
Go to the documentation of this file.
33 int year, month, day, hour, minute, second;
34 year = month = day = hour = minute = second = 0;
37 for (
int i = 0; i < mPattern.
length(); ++i ) {
39 if ( currPos + 1 < dateStr.
length() ) {
40 year = 1900 + dateStr.
mid( currPos, 2 ).
toInt();
46 if ( currPos + 3 < dateStr.
length() ) {
47 year = dateStr.
mid( currPos, 4 ).
toInt();
53 if ( currPos + 1 < dateStr.
length() ) {
54 if ( dateStr[ currPos ].isDigit() ) {
55 if ( dateStr[ currPos + 1 ].isDigit() ) {
56 month = dateStr.
mid( currPos, 2 ).
toInt();
62 if ( currPos < dateStr.
length() ) {
63 if ( dateStr[ currPos ].isDigit() ) {
64 month = dateStr.
mid( currPos, 1 ).
toInt();
72 if ( currPos + 1 < dateStr.
length() ) {
73 month = dateStr.
mid( currPos, 2 ).
toInt();
79 if ( currPos + 1 < dateStr.
length() ) {
80 if ( dateStr[ currPos ].isDigit() ) {
81 if ( dateStr[ currPos + 1 ].isDigit() ) {
82 day = dateStr.
mid( currPos, 2 ).
toInt();
88 if ( currPos < dateStr.
length() ) {
89 if ( dateStr[ currPos ].isDigit() ) {
90 day = dateStr.
mid( currPos, 1 ).
toInt();
98 if ( currPos + 1 < dateStr.
length() ) {
99 day = dateStr.
mid( currPos, 2 ).
toInt();
105 if ( currPos + 1 < dateStr.
length() ) {
106 hour = dateStr.
mid( currPos, 2 ).
toInt();
112 if ( currPos + 1 < dateStr.
length() ) {
113 minute = dateStr.
mid( currPos, 2 ).
toInt();
119 if ( currPos + 1 < dateStr.
length() ) {
120 second = dateStr.
mid( currPos, 2 ).
toInt();
int toInt(bool *ok, int base) const
QDateTime parse(const QString &dateStr) const
QString mid(int position, int n) const
DateParser(const QString &pattern)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:34 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.