DateTime defines a single DateTime type instance.

Example:

const dt0 = new DateTime() // now

const dt1 = new DateTime('2023-07-01 00:00:00.000Z')

Hierarchy

Implements

Constructors

Methods

  • IsZero checks whether the current DateTime instance has zero time value.

    Returns boolean

  • MarshalJSON implements the [json.Marshaler] interface.

    Returns string | number[]

  • Scan implements [sql.Scanner] interface to scan the provided value into the current DateTime instance.

    Parameters

    • value: any

    Returns void

  • String serializes the current DateTime instance into a formatted UTC date string.

    The zero value is serialized to an empty string.

    Returns string

  • UnmarshalJSON implements the [json.Unmarshaler] interface.

    Parameters

    • b: string | number[]

    Returns void

Generated using TypeDoc