All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.core.QDate Maven / Gradle / Ivy

There is a newer version: 6.8.0
Show newest version
package io.qt.core;

import io.qt.*;


/**
 * 

Date functions

*

Java wrapper for Qt class QDate

*/ public class QDate extends QtObject implements java.lang.Comparable, java.lang.Cloneable { static { QtJambi_LibraryUtilities.initialize(); } /** *

See QDate::QDate()

*/ public QDate(){ super((QPrivateConstructor)null); initialize_native(this); } private native static void initialize_native(QDate instance); /** *

See QDate::QDate(QDate)

*/ public QDate(io.qt.core.@NonNull QDate other){ super((QPrivateConstructor)null); initialize_native(this, other); } private native static void initialize_native(QDate instance, io.qt.core.QDate other); /** *

See QDate::QDate(int,int,int)

*/ public QDate(int y, int m, int d){ super((QPrivateConstructor)null); initialize_native(this, y, m, d); } private native static void initialize_native(QDate instance, int y, int m, int d); /** *

See QDate::QDate(int,int,int,QCalendar)

*/ public QDate(int y, int m, int d, io.qt.core.@NonNull QCalendar cal){ super((QPrivateConstructor)null); initialize_native(this, y, m, d, cal); } private native static void initialize_native(QDate instance, int y, int m, int d, io.qt.core.QCalendar cal); /** *

See QDate::addDays(qint64)const

*/ @QtUninvokable public final io.qt.core.@NonNull QDate addDays(long days){ return addDays_native_qint64_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), days); } @QtUninvokable private native io.qt.core.QDate addDays_native_qint64_constfct(long __this__nativeId, long days); /** *

See QDate::addMonths(int)const

*/ @QtUninvokable public final io.qt.core.@NonNull QDate addMonths(int months){ return addMonths_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), months); } @QtUninvokable private native io.qt.core.QDate addMonths_native_int_constfct(long __this__nativeId, int months); /** *

See QDate::addMonths(int,QCalendar)const

*/ @QtUninvokable public final io.qt.core.@NonNull QDate addMonths(int months, io.qt.core.@NonNull QCalendar cal){ return addMonths_native_int_QCalendar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), months, QtJambi_LibraryUtilities.internal.checkedNativeId(cal)); } @QtUninvokable private native io.qt.core.QDate addMonths_native_int_QCalendar_constfct(long __this__nativeId, int months, long cal); /** *

See QDate::addYears(int)const

*/ @QtUninvokable public final io.qt.core.@NonNull QDate addYears(int years){ return addYears_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), years); } @QtUninvokable private native io.qt.core.QDate addYears_native_int_constfct(long __this__nativeId, int years); /** *

See QDate::addYears(int,QCalendar)const

*/ @QtUninvokable public final io.qt.core.@NonNull QDate addYears(int years, io.qt.core.@NonNull QCalendar cal){ return addYears_native_int_QCalendar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), years, QtJambi_LibraryUtilities.internal.checkedNativeId(cal)); } @QtUninvokable private native io.qt.core.QDate addYears_native_int_QCalendar_constfct(long __this__nativeId, int years, long cal); /** *

See QDate::day()const

*/ @QtUninvokable public final int day(){ return day_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int day_native_constfct(long __this__nativeId); /** *

See QDate::day(QCalendar)const

*/ @QtUninvokable public final int day(io.qt.core.@NonNull QCalendar cal){ return day_native_QCalendar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(cal)); } @QtUninvokable private native int day_native_QCalendar_constfct(long __this__nativeId, long cal); /** *

See QDate::dayOfWeek()const

*/ @QtUninvokable public final int dayOfWeek(){ return dayOfWeek_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int dayOfWeek_native_constfct(long __this__nativeId); /** *

See QDate::dayOfWeek(QCalendar)const

*/ @QtUninvokable public final int dayOfWeek(io.qt.core.@NonNull QCalendar cal){ return dayOfWeek_native_QCalendar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(cal)); } @QtUninvokable private native int dayOfWeek_native_QCalendar_constfct(long __this__nativeId, long cal); /** *

See QDate::dayOfYear()const

*/ @QtUninvokable public final int dayOfYear(){ return dayOfYear_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int dayOfYear_native_constfct(long __this__nativeId); /** *

See QDate::dayOfYear(QCalendar)const

*/ @QtUninvokable public final int dayOfYear(io.qt.core.@NonNull QCalendar cal){ return dayOfYear_native_QCalendar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(cal)); } @QtUninvokable private native int dayOfYear_native_QCalendar_constfct(long __this__nativeId, long cal); /** *

See QDate::daysInMonth()const

*/ @QtUninvokable public final int daysInMonth(){ return daysInMonth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int daysInMonth_native_constfct(long __this__nativeId); /** *

See QDate::daysInMonth(QCalendar)const

*/ @QtUninvokable public final int daysInMonth(io.qt.core.@NonNull QCalendar cal){ return daysInMonth_native_QCalendar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(cal)); } @QtUninvokable private native int daysInMonth_native_QCalendar_constfct(long __this__nativeId, long cal); /** *

See QDate::daysInYear()const

*/ @QtUninvokable public final int daysInYear(){ return daysInYear_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int daysInYear_native_constfct(long __this__nativeId); /** *

See QDate::daysInYear(QCalendar)const

*/ @QtUninvokable public final int daysInYear(io.qt.core.@NonNull QCalendar cal){ return daysInYear_native_QCalendar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(cal)); } @QtUninvokable private native int daysInYear_native_QCalendar_constfct(long __this__nativeId, long cal); /** *

See QDate::daysTo(QDate)const

*/ @QtUninvokable public final long daysTo(io.qt.core.@NonNull QDate d){ return daysTo_native_QDate_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(d)); } @QtUninvokable private native long daysTo_native_QDate_constfct(long __this__nativeId, long d); /** *

See QDate::endOfDay()const

*

This function was introduced in Qt 6.5.

*/ @QtUninvokable public final io.qt.core.@NonNull QDateTime endOfDay(){ return endOfDay_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QDateTime endOfDay_native_constfct(long __this__nativeId); /** *

See QDate::endOfDay(QTimeZone)const

*/ @QtUninvokable public final io.qt.core.@NonNull QDateTime endOfDay(io.qt.core.@NonNull QTimeZone zone){ return endOfDay_native_cref_QTimeZone_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(zone)); } @QtUninvokable private native io.qt.core.QDateTime endOfDay_native_cref_QTimeZone_constfct(long __this__nativeId, long zone); /** *

See QDate::endOfDay(Qt::TimeSpec,int)const

*/ @QtUninvokable public final io.qt.core.@NonNull QDateTime endOfDay(io.qt.core.Qt.@NonNull TimeSpec spec, int offsetSeconds){ return endOfDay_native_Qt_TimeSpec_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), spec.value(), offsetSeconds); } @QtUninvokable private native io.qt.core.QDateTime endOfDay_native_Qt_TimeSpec_int_constfct(long __this__nativeId, int spec, int offsetSeconds); /** *

See QDate::isNull()const

*/ @QtUninvokable public final boolean isNull(){ return isNull_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isNull_native_constfct(long __this__nativeId); /** *

See QDate::isValid()const

*/ @QtUninvokable public final boolean isValid(){ return isValid_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean isValid_native_constfct(long __this__nativeId); /** *

See QDate::month()const

*/ @QtUninvokable public final int month(){ return month_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int month_native_constfct(long __this__nativeId); /** *

See QDate::month(QCalendar)const

*/ @QtUninvokable public final int month(io.qt.core.@NonNull QCalendar cal){ return month_native_QCalendar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(cal)); } @QtUninvokable private native int month_native_QCalendar_constfct(long __this__nativeId, long cal); /** *

See operator<(QDate,QDate)

*/ @QtUninvokable private final boolean operator_less(io.qt.core.@NonNull QDate rhs){ return operator_less_native_cref_QDate(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs)); } @QtUninvokable private native boolean operator_less_native_cref_QDate(long __this__nativeId, long rhs); /** *

See operator<<(QDataStream&,QDate)

*/ @QtUninvokable public void writeTo(io.qt.core.@StrictNonNull QDataStream arg__1){ java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected."); writeTo_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); } @QtUninvokable private native void writeTo_native_ref_QDataStream(long __this__nativeId, long arg__1); /** *

See operator==(QDate,QDate)

*/ @QtUninvokable public final boolean equals(io.qt.core.@NonNull QDate rhs){ return equals_native_cref_QDate(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs)); } @QtUninvokable private native boolean equals_native_cref_QDate(long __this__nativeId, long rhs); /** *

See operator>>(QDataStream&,QDate&)

*/ @QtUninvokable public void readFrom(io.qt.core.@StrictNonNull QDataStream arg__1){ java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected."); readFrom_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); } @QtUninvokable private native void readFrom_native_ref_QDataStream(long __this__nativeId, long arg__1); /** *

See QDate::setDate(int,int,int)

*/ @QtUninvokable public final boolean setDate(int year, int month, int day){ return setDate_native_int_int_int(QtJambi_LibraryUtilities.internal.nativeId(this), year, month, day); } @QtUninvokable private native boolean setDate_native_int_int_int(long __this__nativeId, int year, int month, int day); /** *

See QDate::setDate(int,int,int,QCalendar)

*/ @QtUninvokable public final boolean setDate(int year, int month, int day, io.qt.core.@NonNull QCalendar cal){ return setDate_native_int_int_int_QCalendar(QtJambi_LibraryUtilities.internal.nativeId(this), year, month, day, QtJambi_LibraryUtilities.internal.checkedNativeId(cal)); } @QtUninvokable private native boolean setDate_native_int_int_int_QCalendar(long __this__nativeId, int year, int month, int day, long cal); /** *

See QDate::startOfDay()const

*

This function was introduced in Qt 6.5.

*/ @QtUninvokable public final io.qt.core.@NonNull QDateTime startOfDay(){ return startOfDay_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QDateTime startOfDay_native_constfct(long __this__nativeId); /** *

See QDate::startOfDay(QTimeZone)const

*/ @QtUninvokable public final io.qt.core.@NonNull QDateTime startOfDay(io.qt.core.@NonNull QTimeZone zone){ return startOfDay_native_cref_QTimeZone_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(zone)); } @QtUninvokable private native io.qt.core.QDateTime startOfDay_native_cref_QTimeZone_constfct(long __this__nativeId, long zone); /** *

See QDate::startOfDay(Qt::TimeSpec,int)const

*/ @QtUninvokable public final io.qt.core.@NonNull QDateTime startOfDay(io.qt.core.Qt.@NonNull TimeSpec spec, int offsetSeconds){ return startOfDay_native_Qt_TimeSpec_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), spec.value(), offsetSeconds); } @QtUninvokable private native io.qt.core.QDateTime startOfDay_native_Qt_TimeSpec_int_constfct(long __this__nativeId, int spec, int offsetSeconds); /** *

See QDate::toJulianDay()const

*/ @QtUninvokable public final long toJulianDay(){ return toJulianDay_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native long toJulianDay_native_constfct(long __this__nativeId); /** *

See QDate::toString(QStringView)const

*/ @QtUninvokable public final java.lang.@NonNull String toString(java.lang.@NonNull String format){ return toString_native_QStringView_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), format); } @QtUninvokable private native java.lang.String toString_native_QStringView_constfct(long __this__nativeId, java.lang.String format); /** *

See QDate::toString(QStringView,QCalendar)const

*/ @QtUninvokable public final java.lang.@NonNull String toString(java.lang.@NonNull String format, io.qt.core.@NonNull QCalendar cal){ return toString_native_QStringView_QCalendar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), format, QtJambi_LibraryUtilities.internal.checkedNativeId(cal)); } @QtUninvokable private native java.lang.String toString_native_QStringView_QCalendar_constfct(long __this__nativeId, java.lang.String format, long cal); /** *

See QDate::toString(Qt::DateFormat)const

*/ @QtUninvokable public final java.lang.@NonNull String toString(io.qt.core.Qt.@NonNull DateFormat format){ return toString_native_Qt_DateFormat_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), format.value()); } @QtUninvokable private native java.lang.String toString_native_Qt_DateFormat_constfct(long __this__nativeId, int format); /** *

See QDate::weekNumber(int*)const

*/ @QtUninvokable public final io.qt.core.QDate.@StrictNonNull Week weekNumber(){ return weekNumber_native_int_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QDate.Week weekNumber_native_int_ptr_constfct(long __this__nativeId); /** *

See QDate::year()const

*/ @QtUninvokable public final int year(){ return year_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int year_native_constfct(long __this__nativeId); /** *

See QDate::year(QCalendar)const

*/ @QtUninvokable public final int year(io.qt.core.@NonNull QCalendar cal){ return year_native_QCalendar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(cal)); } @QtUninvokable private native int year_native_QCalendar_constfct(long __this__nativeId, long cal); /** *

See QDate::currentDate()

*/ public native static io.qt.core.@NonNull QDate currentDate(); /** *

See QDate::fromJulianDay(qint64)

*/ public native static io.qt.core.@NonNull QDate fromJulianDay(long jd_); /** *

See QDate::fromString(QString,QStringView,int)

*

This function was introduced in Qt 6.7.

*/ public native static io.qt.core.@NonNull QDate fromString(java.lang.@NonNull String string, java.lang.@NonNull String format, int baseYear); /** *

See QDate::fromString(QString,QStringView,int,QCalendar)

*

This function was introduced in Qt 6.0.

*/ public static io.qt.core.@NonNull QDate fromString(java.lang.@NonNull String string, java.lang.@NonNull String format, int baseYear, io.qt.core.@NonNull QCalendar cal){ return fromString_native_cref_QString_QStringView_int_QCalendar(string, format, baseYear, QtJambi_LibraryUtilities.internal.checkedNativeId(cal)); } private native static io.qt.core.QDate fromString_native_cref_QString_QStringView_int_QCalendar(java.lang.String string, java.lang.String format, int baseYear, long cal); /** *

See QDate::fromString(QStringView,Qt::DateFormat)

*

This function was introduced in Qt 6.0.

*/ public static io.qt.core.@NonNull QDate fromString(java.lang.@NonNull String string, io.qt.core.Qt.@NonNull DateFormat format){ return fromString_native_QStringView_Qt_DateFormat(string, format.value()); } private native static io.qt.core.QDate fromString_native_QStringView_Qt_DateFormat(java.lang.String string, int format); /** *

See QDate::isLeapYear(int)

*/ public native static boolean isLeapYear(int year); /** *

See QDate::isValid(int,int,int)

*/ public native static boolean isValid(int y, int m, int d); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QDate(QPrivateConstructor p) { super(p); } /** *

See operator==(QDate,QDate)

*/ @Override @QtUninvokable public boolean equals(Object other) { if (other==null || other instanceof io.qt.core.QDate) { return equals((io.qt.core.QDate) other); } return false; } /** *

See operator<(QDate,QDate)

*/ @QtUninvokable public int compareTo(io.qt.core.@StrictNonNull QDate other) { if (equals(other)) return 0; else if (operator_less(other)) return -1; else return 1; } /** * Returns the objects's hash code computed by qHash(QDate). */ @QtUninvokable @Override public int hashCode() { return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native static int hashCode_native(long __this_nativeId); /** * Result class for {@link QDate#weekNumber()} */ public final static class Week{ private Week(int weekNumber, int yearNumber){ this.weekNumber = weekNumber; this.yearNumber = yearNumber; } public final int weekNumber; public final int yearNumber; } /** *

Creates and returns a copy of this object.

See QDate::QDate(QDate)

*/ @QtUninvokable @Override public QDate clone() { return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private static native QDate clone_native(long __this_nativeId); /** *

Overloaded function for {@link #endOfDay(io.qt.core.Qt.TimeSpec, int)} * with offsetSeconds = 0.

*/ @QtUninvokable public final io.qt.core.@NonNull QDateTime endOfDay(io.qt.core.Qt.@NonNull TimeSpec spec) { return endOfDay(spec, (int)0); } /** *

Overloaded function for {@link #startOfDay(io.qt.core.Qt.TimeSpec, int)} * with offsetSeconds = 0.

*/ @QtUninvokable public final io.qt.core.@NonNull QDateTime startOfDay(io.qt.core.Qt.@NonNull TimeSpec spec) { return startOfDay(spec, (int)0); } /** *

Overloaded function for {@link #toString(io.qt.core.Qt.DateFormat)} * with format = io.qt.core.Qt.DateFormat.TextDate.

*/ @QtUninvokable public final java.lang.@NonNull String toString() { return toString(io.qt.core.Qt.DateFormat.TextDate); } /** *

Overloaded function for {@link #fromString(java.lang.String, java.lang.String, int)} * with baseYear = io.qt.core.QLocale.DefaultTwoDigitBaseYear.

*/ public static io.qt.core.@NonNull QDate fromString(java.lang.@NonNull String string, java.lang.@NonNull String format) { return fromString(string, format, (int)io.qt.core.QLocale.DefaultTwoDigitBaseYear); } /** *

Overloaded function for {@link #fromString(java.lang.String, io.qt.core.Qt.DateFormat)} * with format = io.qt.core.Qt.DateFormat.TextDate.

*/ public static io.qt.core.@NonNull QDate fromString(java.lang.@NonNull String string) { return fromString(string, io.qt.core.Qt.DateFormat.TextDate); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy