Class PythonDate<T extends PythonDate<?>>
java.lang.Object
ai.timefold.jpyinterpreter.types.AbstractPythonLikeObject
ai.timefold.jpyinterpreter.types.datetime.PythonDate<T>
- All Implemented Interfaces:
PythonLikeObject,PythonLikeComparable<T>,PlanningImmutable,Comparable<T>
- Direct Known Subclasses:
PythonDateTime
public class PythonDate<T extends PythonDate<?>>
extends AbstractPythonLikeObject
implements PythonLikeComparable<T>, PlanningImmutable
Python docs: date objects
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic PythonLikeTypestatic PythonLikeTypefinal PythonIntegerfinal PythonIntegerfinal PythonIntegerFields inherited from class ai.timefold.jpyinterpreter.types.AbstractPythonLikeObject
OBJECT_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionPythonDate(PythonLikeType type, LocalDate localDate) PythonDate(LocalDate localDate) -
Method Summary
Modifier and TypeMethodDescription$getAttributeOrNull(String name) Gets an attribute by name.add_time_delta(PythonTimeDelta summand) intctime()booleanstatic PythonDatefrom_iso_calendar(PythonInteger year, PythonInteger week, PythonInteger day) static PythonDatefrom_iso_calendar(PythonLikeType dateType, PythonInteger year, PythonInteger week, PythonInteger day) static PythonDatefrom_iso_format(PythonLikeType dateType, PythonString dateString) static PythonDatefrom_iso_format(PythonString dateString) static PythonDatefrom_ordinal(PythonInteger ordinal) static PythonDatefrom_ordinal(PythonLikeType dateType, PythonInteger ordinal) static PythonDatefrom_timestamp(PythonFloat timestamp) static PythonDatefrom_timestamp(PythonInteger timestamp) static PythonDatefrom_timestamp(PythonLikeType dateType, PythonNumber timestamp) inthashCode()static PythonDateof(int year, int month, int day) static PythonDateof(PythonInteger year, PythonInteger month, PythonInteger day) replace(PythonInteger year, PythonInteger month, PythonInteger day) strftime(PythonString format) subtract_date(PythonDate subtrahend) subtract_time_delta(PythonTimeDelta subtrahend) static PythonDatetoday()static PythonDatetoday(PythonLikeType dateType) toString()weekday()Methods inherited from class ai.timefold.jpyinterpreter.types.AbstractPythonLikeObject
$deleteAttribute, $getType, $setAttribute, getExtraAttributeMap, setAttributeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ai.timefold.jpyinterpreter.types.PythonLikeComparable
greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqualMethods inherited from interface ai.timefold.jpyinterpreter.PythonLikeObject
$getAttributeOrError, $getGenericType, $method$__delattr__, $method$__eq__, $method$__format__, $method$__format__, $method$__getattribute__, $method$__ne__, $method$__repr__, $method$__setattr__
-
Field Details
-
DATE_TYPE
-
$TYPE
-
year
-
month
-
day
-
-
Constructor Details
-
PythonDate
-
PythonDate
-
-
Method Details
-
of
-
of
-
$getAttributeOrNull
Description copied from interface:PythonLikeObjectGets an attribute by name.- Specified by:
$getAttributeOrNullin interfacePythonLikeObject- Overrides:
$getAttributeOrNullin classAbstractPythonLikeObject- Parameters:
name- Name of the attribute to get- Returns:
- The attribute of the object that corresponds with attributeName
-
today
-
today
-
from_timestamp
-
from_timestamp
-
from_timestamp
-
from_ordinal
-
from_ordinal
-
from_iso_format
-
from_iso_format
-
from_iso_calendar
public static PythonDate from_iso_calendar(PythonLikeType dateType, PythonInteger year, PythonInteger week, PythonInteger day) -
from_iso_calendar
public static PythonDate from_iso_calendar(PythonInteger year, PythonInteger week, PythonInteger day) -
add_time_delta
-
subtract_time_delta
-
subtract_date
-
replace
-
timetuple
-
to_ordinal
-
weekday
-
iso_weekday
-
iso_calendar
-
iso_format
-
toPythonString
-
ctime
-
strftime
-
compareTo
- Specified by:
compareToin interfaceComparable<T extends PythonDate<?>>
-
equals
-
toString
- Overrides:
toStringin classAbstractPythonLikeObject
-
hashCode
public int hashCode() -
$method$__hash__
- Specified by:
$method$__hash__in interfacePythonLikeObject
-
$method$__str__
- Specified by:
$method$__str__in interfacePythonLikeObject
-