numpy.npdatetime

Standard library module View source
class datetimestruct
class datetimestruct
Fields 9
year int
month i32
day i32
hour i32
min i32
sec i32
us i32
ps i32
as_ i32
class DatetimeMetaData
@extend
class DatetimeMetaData
Constructors 4
__new__
__new__(base: int, num: int = 1)
__new__
__new__(base: Literal[str], num: int = 1)
__new__
__new__(dt: datetime64)
__new__
__new__(td: timedelta64)
Methods 2
divisor_to_multiple
divisor_to_multiple(self, den: int, metastr: str)
conversion_factor
conversion_factor(self, dst: DatetimeMetaData)
class timedelta64
@extend
class timedelta64[base, num]
Constructors 8
__new__
__new__()
__new__
__new__(value: int, base: Literal[str], num: Literal[int])
__new__
__new__(td: timedelta64, base: Literal[str], num: Literal[int])
__new__
__new__(s: str, base: Literal[str], num: Literal[int])
__new__
__new__(value: int, unit: Literal[str])
__new__
__new__(td: timedelta64, unit: Literal[str] = "generic")
__new__
__new__(s: str, unit: Literal[str] = "generic")
__new__
__new__(td: datetime.timedelta, unit: Literal[str] = "us")
Methods 3
tolist
tolist(self)
cdiv
cdiv(self, other: timedelta64)
cmod
cmod(self, other: timedelta64)
Special methods 22
__eq__
__eq__(self, other: timedelta64)
__ne__
__ne__(self, other: timedelta64)
__lt__
__lt__(self, other: timedelta64)
__gt__
__gt__(self, other: timedelta64)
__le__
__le__(self, other: timedelta64)
__ge__
__ge__(self, other: timedelta64)
__bool__
__bool__(self)
__pos__
__pos__(self)
__neg__
__neg__(self)
__abs__
__abs__(self)
__add__
__add__(self, other)
__add__(self, other: timedelta64)
__add__(self, other: datetime64)
__add__(self, other: int)
__radd__
__radd__(self, other)
__radd__(self, other: int)
__sub__
__sub__(self, other)
__sub__(self, other: timedelta64)
__sub__(self, other: int)
__rsub__
__rsub__(self, other)
__rsub__(self, other: int)
__mul__
__mul__(self, other)
__mul__(self, other: float)
__mul__(self, other: int)
__rmul__
__rmul__(self, other)
__rmul__(self, other: float)
__rmul__(self, other: int)
__floordiv__
__floordiv__(self, other)
__floordiv__(self, other: timedelta64)
__floordiv__(self, other: float)
__floordiv__(self, other: int)
__truediv__
__truediv__(self, other)
__truediv__(self, other: timedelta64)
__truediv__(self, other: float)
__truediv__(self, other: int)
__mod__
__mod__(self, other: timedelta64)
__divmod__
__divmod__(self, other: timedelta64)
__repr__
__repr__(self)
__str__
__str__(self)
class datetime64
@extend
class datetime64[base, num]
Constructors 9
__new__
__new__()
__new__
__new__(value: int, base: Literal[str], num: Literal[int])
__new__
__new__(value: datetime64, base: Literal[str], num: Literal[int])
__new__
__new__(s: str, base: Literal[str], num: Literal[int])
__new__
__new__(value: int, unit: Literal[str])
__new__
__new__(dt: datetime64, unit: Literal[str])
__new__
__new__(s: str, unit: Literal[str] = "us")
__new__
__new__(dt: datetime.datetime, unit: Literal[str] = "us")
__new__
__new__(dt: datetime.date, unit: Literal[str] = "D")
Methods 1
tolist
tolist(self)
Special methods 12
__eq__
__eq__(self, other: datetime64)
__ne__
__ne__(self, other: datetime64)
__lt__
__lt__(self, other: datetime64)
__gt__
__gt__(self, other: datetime64)
__le__
__le__(self, other: datetime64)
__ge__
__ge__(self, other: datetime64)
__bool__
__bool__(self)
__add__
__add__(self, other)
__add__(self, other: timedelta64)
__add__(self, other: int)
__radd__
__radd__(self, other)
__radd__(self, other: int)
__sub__
__sub__(self, other)
__sub__(self, other: timedelta64)
__sub__(self, other: datetime64)
__sub__(self, other: int)
__repr__
__repr__(self)
__str__
__str__(self)
class datetimestruct
@extend
class datetimestruct
Constructors 3
__init__
__init__(self)
__init__
__init__(self, s: str)
__init__
__init__(self, dt: datetime.datetime)
Properties 3
datetime
@property
datetime(self)
days
@property
days(self)
minutes
@property
minutes(self)
Methods 10
reset
reset(self)
copy_to
copy_to(self, other: datetimestruct)
set_days
set_days(self, days: int)
add_minutes
add_minutes(self, minutes: i32)
to_datetime64
to_datetime64(self, meta: DatetimeMetaData)
from_datetime64
from_datetime64(self, meta: DatetimeMetaData, dt: int)
utc_to_local
utc_to_local(self, out: datetimestruct)
lossless_unit
lossless_unit(self)
parse_iso8601
parse_iso8601(self, s: str)
to_str
to_str(self, unit: int, local: bool = False, utc: bool = False, tzoffset: int = -1)
Special methods 1
__str__
__str__(self)