2
* WengoPhone, a voice over Internet phone
3
* Copyright (C) 2004-2006 Wengo
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
#include <util/owutildll.h>
31
* @author Philippe Bernery
34
friend class DateXMLSerializer;
38
* Creates a date with the current time.
45
OWUTIL_API Date(const Date & date);
48
* Creates a date from a day a month and a year.
50
* @param day day of the date
51
* @param month month of the date
52
* @param year year of the date
54
OWUTIL_API Date(unsigned day, unsigned month, unsigned year);
58
OWUTIL_API bool operator==(const Date & date) const;
61
* @return the day number of the date. Day range: 1-31.
63
OWUTIL_API unsigned getDay() const;
70
OWUTIL_API void setDay(unsigned day);
73
* @return the month number of the date. Month range: 1-12.
75
OWUTIL_API unsigned getMonth() const;
78
* Sets the date month.
82
OWUTIL_API void setMonth(unsigned month);
85
* Gets the date year. Year range: 0-infinite.
87
OWUTIL_API unsigned getYear() const;
94
OWUTIL_API void setYear(unsigned year);
97
* @return a string representing the date. (e.g: "dd/mm/yyyy")
99
OWUTIL_API std::string toString() const;