DateTime

DateTime is meant to represent a date time tag with double precision sub-second accuracy.

  • The class also includes support for some time tag manipulation via the + and - operators.

  • The class also implements a rich comparison special function for comparison of time tags.

Factory

from isce3.core import dateTime

obj = dateTime(**kwds)

Documentation

class isce3.core.DateTime.DateTime

Wrapper for pyDateTime.

__add__()

Addition operator.

Parameters
  • dt1 (pyDateTime) – Time tag

  • delta (pyTimeDelta) – Time difference to add

Returns

Resulting time tag

Return type

pyDateTime

__sub__()

Time difference operator.

Parameters
  • dt1 (pyDateTime) – Time tag 1

  • dt2 (pyDateTime) – Time tag 2

Returns

Time difference between two pyDateTime tags.

Return type

pyTimeDelta

static bind(pyDateTime dt)

Binds the current pyEllipsoid instance to another C++ DateTime pointer.

Parameters

dt (pyDateTime) – Source of C++ DateTime pointer.

isoformat()

Return a string in ISO-8601 format.

Returns

Date time in ISO-8601 format

Return type

str

set(dt)

Set pyDateTime using datetime.datetime or str object.

Parameters

dt (datetime.datetime or str) – Input object.

strptime(pydatestr)

Sets underlying C++ DateTime object using time tag in ISO-8601 format

Parameters

pydatestr (str) – Time tag in ISO-8601 format