API reference - Class QDate

Notation used in Ruby API documentation

Description: Binding of QDate

Public constructors

new QDatenewConstructor QDate::QDate()
new QDatenew(int y,
int m,
int d)
Constructor QDate::QDate(int y, int m, int d)

Public methods

[const]bool!=(const QDate other)Method bool QDate::operator!=(const QDate &other)
[const]bool<(const QDate other)Method bool QDate::operator<(const QDate &other)
[const]bool<=(const QDate other)Method bool QDate::operator<=(const QDate &other)
[const]bool==(const QDate other)Method bool QDate::operator==(const QDate &other)
[const]bool>(const QDate other)Method bool QDate::operator>(const QDate &other)
[const]bool>=(const QDate other)Method bool QDate::operator>=(const QDate &other)
[const]QDateaddDays(int days)Method QDate QDate::addDays(int days)
[const]QDateaddMonths(int months)Method QDate QDate::addMonths(int months)
[const]QDateaddYears(int years)Method QDate QDate::addYears(int years)
[const]voidassign(const QDate other)Assign the contents of another object to self
voidcreateEnsures the C++ object is created
[const]intdayMethod int QDate::day()
[const]intdayOfWeekMethod int QDate::dayOfWeek()
[const]intdayOfYearMethod int QDate::dayOfYear()
[const]intdaysInMonthMethod int QDate::daysInMonth()
[const]intdaysInYearMethod int QDate::daysInYear()
[const]intdaysTo(const QDate arg1)Method int QDate::daysTo(const QDate &)
voiddestroyExplicitly destroy the object
[const]booldestroyed?Returns a value indicating whether the object was already destroyed
[const]QDatedupCreates a copy of self
voidgetDate(int ptr year,
int ptr month,
int ptr day)
Method void QDate::getDate(int *year, int *month, int *day)
[const]boolisNullMethod bool QDate::isNull()
[const]boolisNull?Method bool QDate::isNull()
[const]boolisValidMethod bool QDate::isValid()
[const]boolisValid?Method bool QDate::isValid()
[const]boolis_const_object?Returns a value indicating whether the reference is a const reference
[const]intmonthMethod int QDate::month()
boolsetDate(int year,
int month,
int day)
Method bool QDate::setDate(int year, int month, int day)
boolsetYMD(int y,
int m,
int d)
Method bool QDate::setYMD(int y, int m, int d)
[const]inttoJulianDayMethod int QDate::toJulianDay()
[const]stringtoString(const Qt_DateFormat f = Qt::TextDate)Method QString QDate::toString(Qt::DateFormat f)
[const]stringtoString(string format)Method QString QDate::toString(const QString &format)
[const]intweekNumber(int ptr yearNum = 0)Method int QDate::weekNumber(int *yearNum)
[const]intyearMethod int QDate::year()

Public static methods and constants

QDate_MonthNameTypeDateFormatEnum constant QDate::DateFormat
QDate_MonthNameTypeStandaloneFormatEnum constant QDate::StandaloneFormat
QDatecurrentDateStatic method QDate QDate::currentDate()
QDatefromJulianDay(int jd)Static method QDate QDate::fromJulianDay(int jd)
QDatefromString(string s,
const Qt_DateFormat f = Qt::TextDate)
Static method QDate QDate::fromString(const QString &s, Qt::DateFormat f)
QDatefromString(string s,
string format)
Static method QDate QDate::fromString(const QString &s, const QString &format)
unsigned intgregorianToJulian(int y,
int m,
int d)
Static method unsigned int QDate::gregorianToJulian(int y, int m, int d)
boolisLeapYear(int year)Static method bool QDate::isLeapYear(int year)
boolisLeapYear?(int year)Static method bool QDate::isLeapYear(int year)
boolisValid(int y,
int m,
int d)
Static method bool QDate::isValid(int y, int m, int d)
boolisValid?(int y,
int m,
int d)
Static method bool QDate::isValid(int y, int m, int d)
voidjulianToGregorian(unsigned int jd,
int y,
int m,
int d)
Static method void QDate::julianToGregorian(unsigned int jd, int &y, int &m, int &d)
stringlongDayName(int weekday)Static method QString QDate::longDayName(int weekday)
stringlongDayName(int weekday,
const QDate_MonthNameType type)
Static method QString QDate::longDayName(int weekday, QDate::MonthNameType type)
stringlongMonthName(int month)Static method QString QDate::longMonthName(int month)
stringlongMonthName(int month,
const QDate_MonthNameType type)
Static method QString QDate::longMonthName(int month, QDate::MonthNameType type)
stringshortDayName(int weekday)Static method QString QDate::shortDayName(int weekday)
stringshortDayName(int weekday,
const QDate_MonthNameType type)
Static method QString QDate::shortDayName(int weekday, QDate::MonthNameType type)
stringshortMonthName(int month)Static method QString QDate::shortMonthName(int month)
stringshortMonthName(int month,
const QDate_MonthNameType type)
Static method QString QDate::shortMonthName(int month, QDate::MonthNameType type)

Detailed description

[const] bool !=(const QDate other)

Description: Method bool QDate::operator!=(const QDate &other)

[const] bool <(const QDate other)

Description: Method bool QDate::operator<(const QDate &other)

[const] bool <=(const QDate other)

Description: Method bool QDate::operator<=(const QDate &other)

[const] bool ==(const QDate other)

Description: Method bool QDate::operator==(const QDate &other)

[const] bool >(const QDate other)

Description: Method bool QDate::operator>(const QDate &other)

[const] bool >=(const QDate other)

Description: Method bool QDate::operator>=(const QDate &other)

[static] QDate_MonthNameType DateFormat

Description: Enum constant QDate::DateFormat

[static] QDate_MonthNameType StandaloneFormat

Description: Enum constant QDate::StandaloneFormat

[const] QDate addDays(int days)

Description: Method QDate QDate::addDays(int days)

[const] QDate addMonths(int months)

Description: Method QDate QDate::addMonths(int months)

[const] QDate addYears(int years)

Description: Method QDate QDate::addYears(int years)

[const] void assign(const QDate other)

Description: Assign the contents of another object to self

This method assigns the contents of another object to self. This is a deep copy that does not only copy the reference but the actual content.

void create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

[static] QDate currentDate

Description: Static method QDate QDate::currentDate()

This method is static and can be called without an instance.

[const] int day

Description: Method int QDate::day()

[const] int dayOfWeek

Description: Method int QDate::dayOfWeek()

[const] int dayOfYear

Description: Method int QDate::dayOfYear()

[const] int daysInMonth

Description: Method int QDate::daysInMonth()

[const] int daysInYear

Description: Method int QDate::daysInYear()

[const] int daysTo(const QDate arg1)

Description: Method int QDate::daysTo(const QDate &)

void destroy

Description: Explicitly destroy the object

Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing.

[const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

[const] QDate dup

Description: Creates a copy of self

[static] QDate fromJulianDay(int jd)

Description: Static method QDate QDate::fromJulianDay(int jd)

This method is static and can be called without an instance.

[static] QDate fromString(string s,const Qt_DateFormat f = Qt::TextDate)

Description: Static method QDate QDate::fromString(const QString &s, Qt::DateFormat f)

This method is static and can be called without an instance.

[static] QDate fromString(string s,string format)

Description: Static method QDate QDate::fromString(const QString &s, const QString &format)

This method is static and can be called without an instance.

void getDate(int ptr year,int ptr month,int ptr day)

Description: Method void QDate::getDate(int *year, int *month, int *day)

[static] unsigned int gregorianToJulian(int y,int m,int d)

Description: Static method unsigned int QDate::gregorianToJulian(int y, int m, int d)

This method is static and can be called without an instance.

[static] bool isLeapYear(int year)

Description: Static method bool QDate::isLeapYear(int year)

This method is static and can be called without an instance.

[static] bool isLeapYear?(int year)

Description: Static method bool QDate::isLeapYear(int year)

This method is static and can be called without an instance.

[const] bool isNull

Description: Method bool QDate::isNull()

[const] bool isNull?

Description: Method bool QDate::isNull()

[const] bool isValid

Description: Method bool QDate::isValid()

[static] bool isValid(int y,int m,int d)

Description: Static method bool QDate::isValid(int y, int m, int d)

This method is static and can be called without an instance.

[const] bool isValid?

Description: Method bool QDate::isValid()

[static] bool isValid?(int y,int m,int d)

Description: Static method bool QDate::isValid(int y, int m, int d)

This method is static and can be called without an instance.

[const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

[static] void julianToGregorian(unsigned int jd,int y,int m,int d)

Description: Static method void QDate::julianToGregorian(unsigned int jd, int &y, int &m, int &d)

This method is static and can be called without an instance.

[static] string longDayName(int weekday)

Description: Static method QString QDate::longDayName(int weekday)

This method is static and can be called without an instance.

[static] string longDayName(int weekday,const QDate_MonthNameType type)

Description: Static method QString QDate::longDayName(int weekday, QDate::MonthNameType type)

This method is static and can be called without an instance.

[static] string longMonthName(int month)

Description: Static method QString QDate::longMonthName(int month)

This method is static and can be called without an instance.

[static] string longMonthName(int month,const QDate_MonthNameType type)

Description: Static method QString QDate::longMonthName(int month, QDate::MonthNameType type)

This method is static and can be called without an instance.

[const] int month

Description: Method int QDate::month()

[static] new QDate new

Description: Constructor QDate::QDate()

This method creates an object of class QDate.

[static] new QDate new(int y,int m,int d)

Description: Constructor QDate::QDate(int y, int m, int d)

This method creates an object of class QDate.

bool setDate(int year,int month,int day)

Description: Method bool QDate::setDate(int year, int month, int day)

bool setYMD(int y,int m,int d)

Description: Method bool QDate::setYMD(int y, int m, int d)

[static] string shortDayName(int weekday)

Description: Static method QString QDate::shortDayName(int weekday)

This method is static and can be called without an instance.

[static] string shortDayName(int weekday,const QDate_MonthNameType type)

Description: Static method QString QDate::shortDayName(int weekday, QDate::MonthNameType type)

This method is static and can be called without an instance.

[static] string shortMonthName(int month)

Description: Static method QString QDate::shortMonthName(int month)

This method is static and can be called without an instance.

[static] string shortMonthName(int month,const QDate_MonthNameType type)

Description: Static method QString QDate::shortMonthName(int month, QDate::MonthNameType type)

This method is static and can be called without an instance.

[const] int toJulianDay

Description: Method int QDate::toJulianDay()

[const] string toString(const Qt_DateFormat f = Qt::TextDate)

Description: Method QString QDate::toString(Qt::DateFormat f)

[const] string toString(string format)

Description: Method QString QDate::toString(const QString &format)

[const] int weekNumber(int ptr yearNum = 0)

Description: Method int QDate::weekNumber(int *yearNum)

[const] int year

Description: Method int QDate::year()