DateTime represents a [time.Time] instance in UTC that is wrapped and serialized using the app default date layout.

Hierarchy

Implemented by

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

  • Value implements the [driver.Valuer] interface.

    Returns any

Generated using TypeDoc