Module Neodriver_core.Temporal

Date/Time/DateTime/Duration value types.

Temporal value types for the Neo4j driver.

See temporal.ml for the implementation. Named time zones are resolved through the IANA time zone database embedded in Timedesc (timedesc-tzdb, 1970-2040); unknown zones fall back to opaque handling (None).

type tz =
  1. | Offset of int
  2. | Zone_name of string
    (*

    A time zone: a fixed UTC offset in seconds, or an IANA zone name (handled opaquely).

    *)
type date = int

A date as days since 1970-01-01 (proleptic Gregorian).

module Date : sig ... end
type time = {
  1. ticks : int64;
  2. tz_offset_seconds : int option;
}

A time of day as nanoseconds since midnight, with an optional UTC offset in seconds.

module Time : sig ... end
type duration = {
  1. months : int;
  2. days : int;
  3. seconds : int64;
  4. nanoseconds : int;
}

A duration with independent months, days, seconds and nanoseconds.

module Duration : sig ... end
type datetime = {
  1. epoch_seconds : int64;
  2. nanoseconds : int;
  3. tz : tz option;
}

A point in time as UTC epoch seconds + sub-second nanoseconds, with an optional time zone. Named zones are handled opaquely.

module DateTime : sig ... end