-rw-r--r-- | library/timestring.h | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/library/timestring.h b/library/timestring.h index b8d1aea..9a2889b 100644 --- a/library/timestring.h +++ b/library/timestring.h | |||
@@ -3,28 +3,18 @@ | |||
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This program is free software; you can redistribute it and/or modify it | 6 | ** This program is free software; you can redistribute it and/or modify it |
7 | ** under the terms of the GNU General Public License as published by the | 7 | ** under the terms of the GNU General Public License as published by the |
8 | ** Free Software Foundation; either version 2 of the License, or (at your | 8 | ** Free Software Foundation; either version 2 of the License, or (at your |
9 | ** option) any later version. | 9 | ** option) any later version. |
10 | ** | 10 | ** |
11 | ** A copy of the GNU GPL license version 2 is included in this package as | 11 | ** A copy of the GNU GPL license version 2 is included in this package as |
12 | ** LICENSE.GPL. | 12 | ** LICENSE.GPL. |
13 | ** | 13 | ** |
14 | ** This program is distributed in the hope that it will be useful, but | 14 | ** This program is distributed in the hope that it will be useful, but |
15 | ** WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | ** WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | ** See the GNU General Public License for more details. | 17 | ** See the GNU General Public License for more details. |
18 | ** | 18 | ** |
19 | ** In addition, as a special exception Trolltech gives permission to link | ||
20 | ** the code of this program with Qtopia applications copyrighted, developed | ||
21 | ** and distributed by Trolltech under the terms of the Qtopia Personal Use | ||
22 | ** License Agreement. You must comply with the GNU General Public License | ||
23 | ** in all respects for all of the code used other than the applications | ||
24 | ** licensed under the Qtopia Personal Use License Agreement. If you modify | ||
25 | ** this file, you may extend this exception to your version of the file, | ||
26 | ** but you are not obligated to do so. If you do not wish to do so, delete | ||
27 | ** this exception statement from your version. | ||
28 | ** | ||
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 19 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
30 | ** | 20 | ** |
@@ -52,5 +42,5 @@ class QObject; | |||
52 | // it in 12 hour (am/pm) form otherwise return it in 24 hour form | 42 | // it in 12 hour (am/pm) form otherwise return it in 24 hour form |
53 | // in theory Qt 3,0 handles this better (hopefully obsoleteing this) | 43 | // in theory Qt 3,0 handles this better (hopefully obsoleteing this) |
54 | class DateFormat | 44 | class DateFormat |
55 | { | 45 | { |
56 | public: | 46 | public: |
@@ -120,10 +110,10 @@ class TimeString | |||
120 | public: | 110 | public: |
121 | 111 | ||
122 | //enum DateFormat { MonthDayYear, DayMonthYear, ISO8601, | 112 | //enum DateFormat { MonthDayYear, DayMonthYear, ISO8601, |
123 | //YearMonthDay = ISO8601 }; | 113 | //YearMonthDay = ISO8601 }; |
124 | 114 | ||
125 | 115 | ||
126 | //private: | 116 | //private: |
127 | static QString shortDate( const QDate &d ) | 117 | static QString shortDate( const QDate &d ) |
128 | { return shortDate( d, currentDateFormat() ); } | 118 | { return shortDate( d, currentDateFormat() ); } |
129 | static QString dateString( const QDate &d ) | 119 | static QString dateString( const QDate &d ) |
@@ -157,9 +147,9 @@ public: | |||
157 | 147 | ||
158 | // Not recommended to call these (they don't honor system ampm) | 148 | // Not recommended to call these (they don't honor system ampm) |
159 | static QString dateString( const QDateTime &t, bool ampm ); | 149 | static QString dateString( const QDateTime &t, bool ampm = false); |
160 | static QString timeString( const QTime &t, bool ampm, bool seconds ); | 150 | static QString timeString( const QTime &t, bool ampm, bool seconds ); |
161 | static QString timeString( const QTime &t, bool ampm ); | 151 | static QString timeString( const QTime &t, bool ampm = false); |
162 | static QString shortTime( bool ampm, bool seconds ); | 152 | static QString shortTime( bool ampm, bool seconds ); |
163 | static QString shortTime( bool ampm ); | 153 | static QString shortTime( bool ampm = false); |
164 | 154 | ||
165 | static QString numberDateString( const QDate &d, DateFormat ); | 155 | static QString numberDateString( const QDate &d, DateFormat ); |
@@ -176,5 +166,5 @@ public: | |||
176 | private: | 166 | private: |
177 | static QString dateString( const QDateTime &t, bool ampm, bool seconds, DateFormat ); | 167 | static QString dateString( const QDateTime &t, bool ampm, bool seconds, DateFormat ); |
178 | 168 | ||
179 | 169 | ||
180 | }; | 170 | }; |