NanoTimestamp#

class swordfish._swordfishcpp.NanoTimestamp(data: int)#
class swordfish._swordfishcpp.NanoTimestamp(year: int, month: int, day: int, hour: int, minute: int, second: int, nanosecond: int)
class swordfish._swordfishcpp.NanoTimestamp

Represents a Swordfish NanoTimestamp object.

Parameters:
  • data (int, optional) – A Python int used to initialize the NanoTimestamp object (e.g., a timestamp).

  • year (int, optional) – The year component of the NanoTimestamp object.

  • month (int, optional) – The month component of the NanoTimestamp object.

  • day (int, optional) – The day component of the NanoTimestamp object.

  • hour (int, optional) – The hour component of the NanoTimestamp object.

  • minute (int, optional) – The minute component of the NanoTimestamp object.

  • second (int, optional) – The second component of the NanoTimestamp object.

  • nanosecond (int, optional) – The nanosecond component of the NanoTimestamp object.

Examples

>>> import swordfish as sf
>>> sf.data.NanoTimestamp()
NanoTimestamp(null)
>>> sf.data.NanoTimestamp(15)
NanoTimestamp(1970.01.01T00:00:00.000000015)
>>> sf.data.NanoTimestamp(2025, 1, 1, 7, 0, 0, 0)
NanoTimestamp(2025.01.01T07:00:00.000000000)
NULL_VALUE: NanoTimestamp#