Bolty.Types.DateTimeWithTZOffset (Bolty v0.0.11)

Copy Markdown

Manage a Time and its time zone offset.

This temporal types hs been added in bolt v2

Summary

Functions

Create a valid DateTimeWithTZOffset from a NaiveDateTime and offset in seconds

Convert DateTimeWithTZOffset struct into a cypher-compliant string

Types

t()

@type t() :: %Bolty.Types.DateTimeWithTZOffset{
  naive_datetime: Calendar.naive_datetime(),
  timezone_offset: integer()
}

Functions

create(naive_datetime, offset)

@spec create(Calendar.naive_datetime(), integer()) :: t()

Create a valid DateTimeWithTZOffset from a NaiveDateTime and offset in seconds

format_param(param)

@spec format_param(t()) :: {:ok, String.t()} | {:error, any()}

Convert DateTimeWithTZOffset struct into a cypher-compliant string