#include <qdatetime.h>
Definition at line 55 of file qdatetime.h.
Public Types | |
enum | MonthNameType { DateFormat = 0, StandaloneFormat } |
Public Member Functions | |
QDate () | |
QDate (int y, int m, int d) | |
bool | isNull () const |
bool | isValid () const |
int | year () const |
int | month () const |
int | day () const |
int | dayOfWeek () const |
int | dayOfYear () const |
int | daysInMonth () const |
int | daysInYear () const |
int | weekNumber (int *yearNum=0) const |
QString | toString (Qt::DateFormat f=Qt::TextDate) const |
QString | toString (const QString &format) const |
bool | setYMD (int y, int m, int d) |
bool | setDate (int year, int month, int day) |
void | getDate (int *year, int *month, int *day) |
QDate | addDays (int days) const |
QDate | addMonths (int months) const |
QDate | addYears (int years) const |
int | daysTo (const QDate &) const |
bool | operator== (const QDate &other) const |
bool | operator!= (const QDate &other) const |
bool | operator< (const QDate &other) const |
bool | operator<= (const QDate &other) const |
bool | operator> (const QDate &other) const |
bool | operator>= (const QDate &other) const |
int | toJulianDay () const |
Static Public Member Functions | |
static QString | shortMonthName (int month) |
static QString | shortMonthName (int month, MonthNameType type) |
static QString | shortDayName (int weekday) |
static QString | shortDayName (int weekday, MonthNameType type) |
static QString | longMonthName (int month) |
static QString | longMonthName (int month, MonthNameType type) |
static QString | longDayName (int weekday) |
static QString | longDayName (int weekday, MonthNameType type) |
static QDate | currentDate () |
static QDate | fromString (const QString &s, Qt::DateFormat f=Qt::TextDate) |
static QDate | fromString (const QString &s, const QString &format) |
static bool | isValid (int y, int m, int d) |
static bool | isLeapYear (int year) |
static uint | gregorianToJulian (int y, int m, int d) |
static void | julianToGregorian (uint jd, int &y, int &m, int &d) |
static QDate | fromJulianDay (int jd) |
Friends | |
class | QDateTime |
class | QDateTimePrivate |
Q_CORE_EXPORT QDataStream & | operator<< (QDataStream &, const QDate &) |
Q_CORE_EXPORT QDataStream & | operator>> (QDataStream &, QDate &) |
enum MonthNameType |
Enumerator | |
---|---|
DateFormat | |
StandaloneFormat |
Definition at line 58 of file qdatetime.h.
|
inline |
Definition at line 63 of file qdatetime.h.
|
inline |
Definition at line 66 of file qdatetime.h.
bool isValid | ( | ) | const |
int year | ( | ) | const |
int month | ( | ) | const |
int day | ( | ) | const |
int dayOfWeek | ( | ) | const |
int dayOfYear | ( | ) | const |
int daysInMonth | ( | ) | const |
int daysInYear | ( | ) | const |
|
static |
|
static |
|
static |
|
static |
QString toString | ( | Qt::DateFormat | f = Qt::TextDate | ) | const |
|
inline |
Definition at line 107 of file qdatetime.h.
|
inline |
Definition at line 108 of file qdatetime.h.
|
inline |
Definition at line 109 of file qdatetime.h.
|
inline |
Definition at line 110 of file qdatetime.h.
|
inline |
Definition at line 111 of file qdatetime.h.
|
inline |
Definition at line 112 of file qdatetime.h.
|
static |
|
static |
|
static |
Definition at line 133 of file qdatetime.h.
|
inline |
Definition at line 134 of file qdatetime.h.
|
friend |
Definition at line 139 of file qdatetime.h.
|
friend |
Definition at line 140 of file qdatetime.h.
|
friend |
|
friend |