Ananas Library
0.9.5
Main Page
Classes
Files
File List
src
adateservice.h
1
/****************************************************************************
2
** $Id: adateservice.h,v 1.4 2008/05/24 13:12:33 app Exp $
3
**
4
** Header file of Ananas project
5
**
6
** Copyright (C) 2008. Andrey Paskal
7
**
8
** This file is part of the Library of the Ananas
9
** automation accounting system.
10
**
11
** This file may be distributed and/or modified under the terms of the
12
** GNU General Public License version 2 as published by the Free Software
13
** Foundation and appearing in the file LICENSE.GPL included in the
14
** packaging of this file.
15
**
16
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
17
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18
**
19
**********************************************************************/
20
21
#ifndef ADATESERVICE_H
22
#define ADATESERVICE_H
23
24
#include <qdatetime.h>
25
#include "aextension.h"
26
38
class
ANANAS_EXPORT
aDateService
:
public
AExtension
39
{
40
Q_OBJECT
41
public
:
42
aDateService
();
43
aDateService
(
int
y,
int
m,
int
d );
44
aDateService
(
const
aDateService
&);
45
aDateService
(
const
QDate&);
46
~aDateService
();
47
protected
:
48
QDate *dateInstance;
49
public
slots:
50
51
52
bool
IsNull ()
const
;
53
bool
IsValid ()
const
;
54
bool
IsValid (
int
y,
int
m,
int
d ) ;
55
int
Year ()
const
;
56
int
Month ()
const
;
57
int
Day ()
const
;
58
int
DayOfWeek ()
const
;
59
int
DayOfYear ()
const
;
60
int
DaysInMonth ()
const
;
61
int
DaysInYear ()
const
;
62
int
WeekNumber ()
const
;
63
QString ToString (
const
QString & format = QString::null)
const
;
64
QDate ToDate ()
const
;
65
bool
SetYMD (
int
y,
int
m,
int
d ) ;
66
aDateService
* AddDays (
int
ndays )
const
;
67
aDateService
* AddMonths (
int
nmonths )
const
;
68
aDateService
* AddYears (
int
nyears )
const
;
69
int
DaysTo (
const
aDateService
& target)
const
;
70
int
DaysTo (
const
QDate& target )
const
;
71
72
};
73
74
#endif
// ADATESERVICE_H
AExtension
Definition
aextension.h:46
aDateService
Definition
adateservice.h:39
Generated by
1.12.0