NebulaGraphEx.Types.NebDateTime (nebula_graph_ex v0.1.10)

Copy Markdown View Source

NebulaGraph datetime value (no timezone).

NebulaGraph stores datetimes without timezone information. Use to_datetime/1 to convert to a UTC %DateTime{} when timezone context is known externally.

Fields

  • :year, :month, :day — date components
  • :hour, :minute, :second — time components
  • :microsecond — sub-second precision

Summary

Functions

Converts to a %NaiveDateTime{} (no timezone).

Converts to %NaiveDateTime{}, raising on invalid values.

Types

t()

@type t() :: %NebulaGraphEx.Types.NebDateTime{
  day: 1..31,
  hour: 0..23,
  microsecond: non_neg_integer(),
  minute: 0..59,
  month: 1..12,
  second: 0..59,
  year: integer()
}

Functions

to_naive(neb_date_time)

@spec to_naive(t()) :: {:ok, NaiveDateTime.t()} | {:error, atom()}

Converts to a %NaiveDateTime{} (no timezone).

to_naive!(ndt)

@spec to_naive!(t()) :: NaiveDateTime.t()

Converts to %NaiveDateTime{}, raising on invalid values.