Class PythonDateTime
java.lang.Object
ai.timefold.jpyinterpreter.types.AbstractPythonLikeObject
ai.timefold.jpyinterpreter.types.datetime.PythonDate<PythonDateTime>
ai.timefold.jpyinterpreter.types.datetime.PythonDateTime
- All Implemented Interfaces:
PythonLikeObject,PythonLikeComparable<PythonDateTime>,PlanningImmutable,Comparable<PythonDateTime>
Python docs: datetime objects
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic PythonLikeTypestatic PythonLikeTypefinal PythonIntegerfinal PythonIntegerfinal PythonIntegerfinal PythonIntegerfinal PythonIntegerfinal PythonLikeObjectFields inherited from class ai.timefold.jpyinterpreter.types.datetime.PythonDate
DATE_TYPE, day, month, yearFields inherited from class ai.timefold.jpyinterpreter.types.AbstractPythonLikeObject
OBJECT_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionPythonDateTime(LocalDate localDate, LocalTime localTime) PythonDateTime(LocalDate localDate, LocalTime localTime, PythonLikeObject tzinfo, int fold) PythonDateTime(LocalDate localDate, LocalTime localTime, ZoneId zoneId) PythonDateTime(LocalDate localDate, LocalTime localTime, ZoneId zoneId, int fold) PythonDateTime(LocalDateTime localDateTime) PythonDateTime(ZonedDateTime zonedDateTime) -
Method Summary
Modifier and TypeMethodDescription$getAttributeOrNull(String name) Gets an attribute by name.add_time_delta(PythonTimeDelta summand) astimezone(PythonTzinfo zoneId) static PythonDateTimecombine(PythonLikeType type, PythonDate pythonDate, PythonTime pythonTime, PythonLikeObject tzinfo) intcompareTo(PythonDateTime other) ctime()PythonDate<PythonDate<?>>date()dst()booleanstatic PythonDatefrom_iso_calendar(PythonInteger year, PythonInteger week, PythonInteger day) static PythonDateTimefrom_iso_format(PythonString dateString) static PythonDateTimefrom_ordinal(PythonInteger ordinal) static PythonDateTimefrom_timestamp(PythonFloat timestamp, PythonLikeObject tzinfo) static PythonDateTimefrom_timestamp(PythonInteger timestamp, PythonLikeObject tzinfo) static PythonDateTimefrom_timestamp(PythonLikeType type, PythonNumber timestamp, PythonLikeObject tzinfo) inthashCode()iso_format(PythonString sep, PythonString timespec) static PythonDateTimenow(PythonLikeType type, PythonLikeObject tzinfo) static PythonDateTimeof(int year, int month, int day, int hour, int minute, int second, int microsecond, String tzname, int fold) static PythonDateTimeof(PythonInteger year, PythonInteger month, PythonInteger day, PythonInteger hour, PythonInteger minute, PythonInteger second, PythonInteger microsecond, PythonLikeObject tzinfo, PythonInteger fold) replace(PythonInteger year, PythonInteger month, PythonInteger day, PythonInteger hour, PythonInteger minute, PythonInteger second, PythonInteger microsecond, PythonLikeObject tzinfo, PythonInteger fold) strftime(PythonString format) static PythonDateTimestrptime(PythonLikeType type, PythonString date_string, PythonString format) subtract_date_time(PythonDateTime subtrahend) subtract_time_delta(PythonTimeDelta subtrahend) time()timetz()tzname()static PythonDateTimeutc_from_timestamp(PythonFloat timestamp) static PythonDateTimeutc_from_timestamp(PythonInteger timestamp) static PythonDateTimeutc_from_timestamp(PythonLikeType type, PythonNumber timestamp) static PythonDateTimeutc_now(PythonLikeType type) Methods inherited from class ai.timefold.jpyinterpreter.types.datetime.PythonDate
$method$__str__, from_iso_calendar, from_iso_format, from_ordinal, from_timestamp, from_timestamp, from_timestamp, iso_calendar, iso_weekday, of, of, replace, subtract_date, to_ordinal, today, today, toString, weekdayMethods 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_TIME_TYPE
-
$TYPE
-
hour
-
minute
-
second
-
microsecond
-
fold
-
tzinfo
-
-
Constructor Details
-
PythonDateTime
-
PythonDateTime
-
PythonDateTime
-
PythonDateTime
-
PythonDateTime
-
PythonDateTime
-
-
Method Details
-
of
public static PythonDateTime of(PythonInteger year, PythonInteger month, PythonInteger day, PythonInteger hour, PythonInteger minute, PythonInteger second, PythonInteger microsecond, PythonLikeObject tzinfo, PythonInteger fold) -
of
public static PythonDateTime of(int year, int month, int day, int hour, int minute, int second, int microsecond, String tzname, int fold) -
$getAttributeOrNull
Description copied from interface:PythonLikeObjectGets an attribute by name.- Specified by:
$getAttributeOrNullin interfacePythonLikeObject- Overrides:
$getAttributeOrNullin classPythonDate<PythonDateTime>- Parameters:
name- Name of the attribute to get- Returns:
- The attribute of the object that corresponds with attributeName
-
now
-
utc_now
-
from_ordinal
-
from_timestamp
public static PythonDateTime from_timestamp(PythonLikeType type, PythonNumber timestamp, PythonLikeObject tzinfo) -
from_timestamp
-
from_timestamp
-
utc_from_timestamp
-
utc_from_timestamp
-
utc_from_timestamp
-
combine
public static PythonDateTime combine(PythonLikeType type, PythonDate pythonDate, PythonTime pythonTime, PythonLikeObject tzinfo) -
from_iso_format
-
from_iso_calendar
public static PythonDate from_iso_calendar(PythonInteger year, PythonInteger week, PythonInteger day) -
strptime
public static PythonDateTime strptime(PythonLikeType type, PythonString date_string, PythonString format) -
add_time_delta
- Overrides:
add_time_deltain classPythonDate<PythonDateTime>
-
subtract_time_delta
- Overrides:
subtract_time_deltain classPythonDate<PythonDateTime>
-
subtract_date_time
-
compareTo
- Specified by:
compareToin interfaceComparable<PythonDateTime>- Overrides:
compareToin classPythonDate<PythonDateTime>
-
date
-
time
-
timetz
-
replace
public PythonDateTime replace(PythonInteger year, PythonInteger month, PythonInteger day, PythonInteger hour, PythonInteger minute, PythonInteger second, PythonInteger microsecond, PythonLikeObject tzinfo, PythonInteger fold) -
astimezone
-
utcoffset
-
dst
-
tzname
-
timetuple
- Overrides:
timetuplein classPythonDate<PythonDateTime>
-
utctimetuple
-
timestamp
-
iso_format
- Overrides:
iso_formatin classPythonDate<PythonDateTime>
-
iso_format
-
toPythonString
- Overrides:
toPythonStringin classPythonDate<PythonDateTime>
-
ctime
- Overrides:
ctimein classPythonDate<PythonDateTime>
-
strftime
- Overrides:
strftimein classPythonDate<PythonDateTime>
-
equals
- Overrides:
equalsin classPythonDate<PythonDateTime>
-
hashCode
public int hashCode()- Overrides:
hashCodein classPythonDate<PythonDateTime>
-
$method$__hash__
- Specified by:
$method$__hash__in interfacePythonLikeObject- Overrides:
$method$__hash__in classPythonDate<PythonDateTime>
-