alkimia
8.0.3
src
alkdateformat.h
Go to the documentation of this file.
1
/***************************************************************************
2
* Copyright 2004 Ace Jones <acejones@users.sourceforge.net> *
3
* *
4
* This file is part of libalkimia. *
5
* *
6
* libalkimia is free software; you can redistribute it and/or *
7
* modify it under the terms of the GNU General Public License *
8
* as published by the Free Software Foundation; either version 2.1 of *
9
* the License or (at your option) version 3 or any later version. *
10
* *
11
* libalkimia is distributed in the hope that it will be useful, *
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
* GNU General Public License for more details. *
15
* *
16
* You should have received a copy of the GNU General Public License *
17
* along with this program. If not, see <http://www.gnu.org/licenses/> *
18
***************************************************************************/
19
20
#ifndef ALKDATEFORMAT_H
21
#define ALKDATEFORMAT_H
22
23
#include "
alkexception.h
"
24
25
#include <QDate>
26
#include <QRegExp>
27
#include <QString>
28
#include <QStringList>
29
39
class
ALK_NO_EXPORT
AlkDateFormat
40
{
41
public
:
42
explicit
AlkDateFormat
(
const
QString &format);
43
~
AlkDateFormat
();
44
45
AlkDateFormat
& operator=(
const
AlkDateFormat
&);
46
47
typedef
enum
{
48
NoError = 0,
49
InvalidFormatString
,
50
InvalidFormatCharacter
,
51
InvalidDate
,
52
InvalidDay
,
53
InvalidMonth
,
54
InvalidYear
,
55
InvalidYearLength
,
56
} ErrorCode;
57
58
QString convertDate(
const
QDate &date);
59
QDate convertString(
const
QString &date,
bool
strict =
true
,
60
unsigned
centuryMidPoint = QDate::currentDate().year());
61
const
QString &format()
const
;
62
63
QString lastErrorMessage()
const
;
64
ErrorCode lastError()
const
;
65
66
private
:
67
class
Private
;
68
Private
*
const
d
;
69
};
70
71
#endif // ALKDATEFORMAT_H
AlkDateFormat::InvalidFormatCharacter
Definition:
alkdateformat.h:50
AlkDateFormat::InvalidDate
Definition:
alkdateformat.h:51
AlkDateFormat::InvalidMonth
Definition:
alkdateformat.h:53
AlkDateFormat::d
Private *const d
Definition:
alkdateformat.h:67
AlkDateFormat::InvalidYear
Definition:
alkdateformat.h:54
AlkDateFormat::InvalidDay
Definition:
alkdateformat.h:52
AlkDateFormat::Private
Definition:
alkdateformat.cpp:36
AlkDateFormat
Definition:
alkdateformat.h:39
AlkDateFormat::InvalidYearLength
Definition:
alkdateformat.h:55
alkexception.h
AlkDateFormat::InvalidFormatString
Definition:
alkdateformat.h:49
Generated by
1.8.14