QDate

#include <QtCore/QDate>

More information will be added here shortly. For now, you'll find more extensive information about this class in the Qt reference for QDate


Overview

Public Types Index

enum MonthNameType

DateFormat 0, StandaloneFormat

Public Functions Index

QDate ()
QDate (int y, int m, int d)
QDateaddDays (int days) const
QDateaddMonths (int months) const
QDateaddYears (int years) const
intday () const
intdayOfWeek () const
intdayOfYear () const
intdaysInMonth () const
intdaysInYear () const
intdaysTo (const QDate &) const
voidgetDate (int *year, int *month, int *day)
boolisNull () const
boolisValid () const
intmonth () const
booloperator!= (const QDate &other) const
booloperator< (const QDate &other) const
booloperator<= (const QDate &other) const
booloperator== (const QDate &other) const
booloperator> (const QDate &other) const
booloperator>= (const QDate &other) const
boolsetDate (int year, int month, int day)
boolsetYMD (int y, int m, int d)
inttoJulianDay () const
QStringtoString (Qt::DateFormat f=Qt::TextDate) const
QStringtoString (const QString &format) const
intweekNumber (int *yearNum=0) const
intyear () const

Static Public Functions Index

QDatecurrentDate ()
QDatefromJulianDay (int jd)
QDatefromString (const QString &s, Qt::DateFormat f=Qt::TextDate)
QDatefromString (const QString &s, const QString &format)
uintgregorianToJulian (int y, int m, int d)
boolisLeapYear (int year)
boolisValid (int y, int m, int d)
voidjulianToGregorian (uint jd, int &y, int &m, int &d)
QStringlongDayName (int weekday)
QStringlongDayName (int weekday, MonthNameType type)
QStringlongMonthName (int month)
QStringlongMonthName (int month, MonthNameType type)
QStringshortDayName (int weekday)
QStringshortDayName (int weekday, MonthNameType type)
QStringshortMonthName (int month)
QStringshortMonthName (int month, MonthNameType type)

Public Types

MonthNameType

DateFormat 0
StandaloneFormat

Public Functions

QDate ()

QDate (
  • inty,
  • intm,
  • intd )

QDate addDays (
  • intdays)

QDate addMonths (
  • intmonths)

QDate addYears (
  • intyears)

int day ()

int dayOfWeek ()

int dayOfYear ()

int daysInMonth ()

int daysInYear ()

int daysTo (

void getDate (
  • int *year,
  • int *month,
  • int *day )

bool isNull ()

bool isValid ()

int month ()

bool operator!= (

bool operator< (

bool operator<= (

bool operator== (

bool operator> (

bool operator>= (

bool setDate (
  • intyear,
  • intmonth,
  • intday )

bool setYMD (
  • inty,
  • intm,
  • intd )

int toJulianDay ()

QString toString (
  • Qt::DateFormatf)

QString toString (

int weekNumber (
  • int *yearNum)

int year ()

Static Public Functions

QDate currentDate ()

QDate fromJulianDay (
  • intjd)

QDate fromString (
  • const QString &s,
  • Qt::DateFormatf )

QDate fromString (

uint gregorianToJulian (
  • inty,
  • intm,
  • intd )

bool isLeapYear (
  • intyear)

bool isValid (
  • inty,
  • intm,
  • intd )

void julianToGregorian (
  • uintjd,
  • int &y,
  • int &m,
  • int &d )

QString longDayName (
  • intweekday)

QString longDayName (
  • intweekday,
  • MonthNameTypetype )

QString longMonthName (
  • intmonth)

QString longMonthName (
  • intmonth,
  • MonthNameTypetype )

QString shortDayName (
  • intweekday)

QString shortDayName (
  • intweekday,
  • MonthNameTypetype )

QString shortMonthName (
  • intmonth)

QString shortMonthName (
  • intmonth,
  • MonthNameTypetype )

Last modified: 2015-07-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus