datetime API Reference
Full documentation for datetime (Standard Library / Native)
datetime.MAXYEAR
Python Library Documentation: int object
class int(object)
| int([x]) -> integer
| int(x, base=10) -> integer
|
| Convert a number or string to an integer, or return 0 if no arguments
| are given. If x is a number, return x.__int__(). For floating-point
| numbers, this truncates towards zero.
|
| If x is not a number or if base is given, then x must be a string,
| bytes, or bytearray instance representing an integer literal in the
| given base. The literal can be preceded by '+' or '-' and be surrounded
| by whitespace. The base defaults to 10. Valid bases are 0 and 2-36.
| Base 0 means to interpret the base from the string as an integer literal.
| >>> int('0b100', base=0)
| 4
|
| Built-in subclasses:
| bool
|
| Methods defined here:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __format__(self, format_spec, /)
| Convert to a string according to format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __repr__(self, /)
| Return repr(self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
datetime.MINYEAR
Python Library Documentation: int object
class int(object)
| int([x]) -> integer
| int(x, base=10) -> integer
|
| Convert a number or string to an integer, or return 0 if no arguments
| are given. If x is a number, return x.__int__(). For floating-point
| numbers, this truncates towards zero.
|
| If x is not a number or if base is given, then x must be a string,
| bytes, or bytearray instance representing an integer literal in the
| given base. The literal can be preceded by '+' or '-' and be surrounded
| by whitespace. The base defaults to 10. Valid bases are 0 and 2-36.
| Base 0 means to interpret the base from the string as an integer literal.
| >>> int('0b100', base=0)
| 4
|
| Built-in subclasses:
| bool
|
| Methods defined here:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __format__(self, format_spec, /)
| Convert to a string according to format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __repr__(self, /)
| Return repr(self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
datetime.UTC
Python Library Documentation: timezone object class timezone(tzinfo) | Fixed offset from UTC implementation of tzinfo. | | Method resolution order: | timezone | tzinfo | builtins.object | | Methods defined here: | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __getinitargs__(...) | pickle support | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | __str__(self, /) | Return str(self). | | dst(...) | Return None. | | fromutc(...) | datetime in UTC -> datetime in local time. | | tzname(...) | If name is specified when timezone is created, returns the name. Otherwise returns offset as 'UTC(+|-)HH:MM'. | | utcoffset(...) | Return fixed offset. | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | max = datetime.timezone(datetime.timedelta(seconds=86340)) | | min = datetime.timezone(datetime.timedelta(days=-1, seconds=60)) | | utc = datetime.timezone.utc | | ---------------------------------------------------------------------- | Methods inherited from tzinfo: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | -> (cls, state)
datetime.date
Python Library Documentation: class date in module datetime class date(builtins.object) | date(year, month, day) --> date object | | Methods defined here: | | __add__(self, value, /) | Return self+value. | | __eq__(self, value, /) | Return self==value. | | __format__(...) | Formats self with strftime. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __radd__(self, value, /) | Return value+self. | | __reduce__(...) | __reduce__() -> (cls, state) | | __repr__(self, /) | Return repr(self). | | __rsub__(self, value, /) | Return value-self. | | __str__(self, /) | Return str(self). | | __sub__(self, value, /) | Return self-value. | | ctime(...) | Return ctime() style string. | | isocalendar(...) | Return a named tuple containing ISO year, week number, and weekday. | | isoformat(...) | Return string in ISO 8601 format, YYYY-MM-DD. | | isoweekday(...) | Return the day of the week represented by the date. | Monday == 1 ... Sunday == 7 | | replace(...) | Return date with new specified fields. | | strftime(...) | format -> strftime() style string. | | timetuple(...) | Return time tuple, compatible with time.localtime(). | | toordinal(...) | Return proleptic Gregorian ordinal. January 1 of year 1 is day 1. | | weekday(...) | Return the day of the week represented by the date. | Monday == 0 ... Sunday == 6 | | ---------------------------------------------------------------------- | Class methods defined here: | | fromisocalendar(...) | int, int, int -> Construct a date from the ISO year, week number and weekday. | | This is the inverse of the date.isocalendar() function | | fromisoformat(...) | str -> Construct a date from a string in ISO 8601 format. | | fromordinal(...) | int -> date corresponding to a proleptic Gregorian ordinal. | | fromtimestamp(timestamp, /) | Create a date from a POSIX timestamp. | | The timestamp is a number, e.g. created via time.time(), that is interpreted | as local time. | | today(...) | Current date or datetime: same as self.__class__.fromtimestamp(time.time()). | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | day | | month | | year | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | max = datetime.date(9999, 12, 31) | | min = datetime.date(1, 1, 1) | | resolution = datetime.timedelta(days=1)
datetime.datetime
Python Library Documentation: class datetime in module datetime class datetime(date) | datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]]) | | The year, month and day arguments are required. tzinfo may be None, or an | instance of a tzinfo subclass. The remaining arguments may be ints. | | Method resolution order: | datetime | date | builtins.object | | Methods defined here: | | __add__(self, value, /) | Return self+value. | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __radd__(self, value, /) | Return value+self. | | __reduce__(...) | __reduce__() -> (cls, state) | | __reduce_ex__(...) | __reduce_ex__(proto) -> (cls, state) | | __repr__(self, /) | Return repr(self). | | __rsub__(self, value, /) | Return value-self. | | __str__(self, /) | Return str(self). | | __sub__(self, value, /) | Return self-value. | | astimezone(...) | tz -> convert to local time in new timezone tz | | ctime(...) | Return ctime() style string. | | date(...) | Return date object with same year, month and day. | | dst(...) | Return self.tzinfo.dst(self). | | isoformat(...) | [sep] -> string in ISO 8601 format, YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM]. | sep is used to separate the year from the time, and defaults to 'T'. | The optional argument timespec specifies the number of additional terms | of the time to include. Valid options are 'auto', 'hours', 'minutes', | 'seconds', 'milliseconds' and 'microseconds'. | | replace(...) | Return datetime with new specified fields. | | time(...) | Return time object with same time but with tzinfo=None. | | timestamp(...) | Return POSIX timestamp as float. | | timetuple(...) | Return time tuple, compatible with time.localtime(). | | timetz(...) | Return time object with same time and tzinfo. | | tzname(...) | Return self.tzinfo.tzname(self). | | utcoffset(...) | Return self.tzinfo.utcoffset(self). | | utctimetuple(...) | Return UTC time tuple, compatible with time.localtime(). | | ---------------------------------------------------------------------- | Class methods defined here: | | combine(...) | date, time -> datetime with same date and time fields | | fromisoformat(...) | string -> datetime from a string in most ISO 8601 formats | | fromtimestamp(...) | timestamp[, tz] -> tz's local time from POSIX timestamp. | | now(tz=None) | Returns new datetime object representing current time local to tz. | | tz | Timezone object. | | If no tz is specified, uses local timezone. | | strptime(...) | string, format -> new datetime parsed from a string (like time.strptime()). | | utcfromtimestamp(...) | Construct a naive UTC datetime from a POSIX timestamp. | | utcnow(...) | Return a new datetime representing UTC day and time. | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | fold | | hour | | microsecond | | minute | | second | | tzinfo | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | max = datetime.datetime(9999, 12, 31, 23, 59, 59, 999999) | | min = datetime.datetime(1, 1, 1, 0, 0) | | resolution = datetime.timedelta(microseconds=1) | | ---------------------------------------------------------------------- | Methods inherited from date: | | __format__(...) | Formats self with strftime. | | isocalendar(...) | Return a named tuple containing ISO year, week number, and weekday. | | isoweekday(...) | Return the day of the week represented by the date. | Monday == 1 ... Sunday == 7 | | strftime(...) | format -> strftime() style string. | | toordinal(...) | Return proleptic Gregorian ordinal. January 1 of year 1 is day 1. | | weekday(...) | Return the day of the week represented by the date. | Monday == 0 ... Sunday == 6 | | ---------------------------------------------------------------------- | Class methods inherited from date: | | fromisocalendar(...) | int, int, int -> Construct a date from the ISO year, week number and weekday. | | This is the inverse of the date.isocalendar() function | | fromordinal(...) | int -> date corresponding to a proleptic Gregorian ordinal. | | today(...) | Current date or datetime: same as self.__class__.fromtimestamp(time.time()). | | ---------------------------------------------------------------------- | Data descriptors inherited from date: | | day | | month | | year
datetime.datetime_CAPI
Python Library Documentation: PyCapsule object class PyCapsule(object) | Capsule objects let you wrap a C "void *" pointer in a Python | object. They're a way of passing data through the Python interpreter | without creating your own custom type. | | Capsules are used for communication between extension modules. | They provide a way for an extension module to export a C interface | to other extension modules, so that extension modules can use the | Python import mechanism to link to one another. | | Methods defined here: | | __repr__(self, /) | Return repr(self).
datetime.time
Python Library Documentation: class time in module datetime class time(builtins.object) | time([hour[, minute[, second[, microsecond[, tzinfo]]]]]) --> a time object | | All arguments are optional. tzinfo may be None, or an instance of | a tzinfo subclass. The remaining arguments may be ints. | | Methods defined here: | | __eq__(self, value, /) | Return self==value. | | __format__(...) | Formats self with strftime. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __reduce__(...) | __reduce__() -> (cls, state) | | __reduce_ex__(...) | __reduce_ex__(proto) -> (cls, state) | | __repr__(self, /) | Return repr(self). | | __str__(self, /) | Return str(self). | | dst(...) | Return self.tzinfo.dst(self). | | isoformat(...) | Return string in ISO 8601 format, [HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM]. | | The optional argument timespec specifies the number of additional terms | of the time to include. Valid options are 'auto', 'hours', 'minutes', | 'seconds', 'milliseconds' and 'microseconds'. | | replace(...) | Return time with new specified fields. | | strftime(...) | format -> strftime() style string. | | tzname(...) | Return self.tzinfo.tzname(self). | | utcoffset(...) | Return self.tzinfo.utcoffset(self). | | ---------------------------------------------------------------------- | Class methods defined here: | | fromisoformat(...) | string -> time from a string in ISO 8601 format | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | fold | | hour | | microsecond | | minute | | second | | tzinfo | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | max = datetime.time(23, 59, 59, 999999) | | min = datetime.time(0, 0) | | resolution = datetime.timedelta(microseconds=1)
datetime.timedelta
Python Library Documentation: class timedelta in module datetime class timedelta(builtins.object) | Difference between two datetime values. | | timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0) | | All arguments are optional and default to 0. | Arguments may be integers or floats, and may be positive or negative. | | Methods defined here: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __bool__(self, /) | True if self else False | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __floordiv__(self, value, /) | Return self//value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __pos__(self, /) | +self | | __radd__(self, value, /) | Return value+self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __reduce__(...) | __reduce__() -> (cls, state) | | __repr__(self, /) | Return repr(self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __str__(self, /) | Return str(self). | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | total_seconds(...) | Total seconds in the duration. | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | days | Number of days. | | microseconds | Number of microseconds (>= 0 and less than 1 second). | | seconds | Number of seconds (>= 0 and less than 1 day). | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | max = datetime.timedelta(days=999999999, seconds=86399, microseconds=9... | | min = datetime.timedelta(days=-999999999) | | resolution = datetime.timedelta(microseconds=1)
datetime.timezone
Python Library Documentation: class timezone in module datetime class timezone(tzinfo) | Fixed offset from UTC implementation of tzinfo. | | Method resolution order: | timezone | tzinfo | builtins.object | | Methods defined here: | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __getinitargs__(...) | pickle support | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __le__(self, value, /) | Return self<=value. | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | __str__(self, /) | Return str(self). | | dst(...) | Return None. | | fromutc(...) | datetime in UTC -> datetime in local time. | | tzname(...) | If name is specified when timezone is created, returns the name. Otherwise returns offset as 'UTC(+|-)HH:MM'. | | utcoffset(...) | Return fixed offset. | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | max = datetime.timezone(datetime.timedelta(seconds=86340)) | | min = datetime.timezone(datetime.timedelta(days=-1, seconds=60)) | | utc = datetime.timezone.utc | | ---------------------------------------------------------------------- | Methods inherited from tzinfo: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | -> (cls, state)
datetime.tzinfo
Python Library Documentation: class tzinfo in module datetime class tzinfo(builtins.object) | Abstract base class for time zone info objects. | | Methods defined here: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | -> (cls, state) | | dst(...) | datetime -> DST offset as timedelta positive east of UTC. | | fromutc(...) | datetime in UTC -> datetime in local time. | | tzname(...) | datetime -> string name of time zone. | | utcoffset(...) | datetime -> timedelta showing offset from UTC, negative values indicating West of UTC | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature.