Skip to main content

Module datetime

Module datetime 

Source
Expand description

Temporal functions for Cypher query evaluation.

Provides date, time, datetime, and duration constructors along with extraction functions compatible with OpenCypher temporal types.

Structs§

CypherDuration
Represents a Cypher duration with separate month, day, and nanosecond components.

Enums§

TemporalType
Classification of temporal types for dispatch.
TimezoneInfo
Parsed timezone information.

Functions§

add_cypher_duration_to_date
Add a CypherDuration to a date string, returning the result date string.
add_cypher_duration_to_datetime
Add a CypherDuration to a datetime-with-timezone string, returning the result string.
add_cypher_duration_to_localdatetime
Add a CypherDuration to a local datetime string, returning the result string.
add_cypher_duration_to_localtime
Add a CypherDuration to a local time string, returning the result time string.
add_cypher_duration_to_time
Add a CypherDuration to a time-with-timezone string, returning the result time string.
add_duration_to_date
Add duration (microseconds) to date.
add_duration_to_datetime
Add duration (microseconds) to datetime.
add_months_to_date
Add months to a date with day-of-month clamping.
classify_temporal
Classify a string value into its temporal type using pattern detection.
datetime_difference
Subtract two datetimes, return duration in microseconds.
duration_to_micros
Convert a duration value (ISO 8601 string or i64 micros) to microseconds.
eval_datetime_function
eval_datetime_function_with_clock
Evaluate a temporal function using a frozen statement clock.
eval_duration_accessor
Evaluate a duration component accessor using Euclidean division.
eval_temporal_accessor
Evaluate a temporal component accessor.
eval_temporal_accessor_value
Evaluate a temporal component accessor on a Value.
is_date_value
Check if value is a date string or temporal date.
is_datetime_value
Check if value is a datetime string or temporal datetime.
is_duration_accessor
Check if a property name is a valid duration accessor.
is_duration_or_micros
Check if a value is a duration string OR an integer (microseconds).
is_duration_string
Check if a string looks like a duration value.
is_duration_value
Check if value is a duration (ISO 8601 string starting with ‘P’ or temporal duration).
is_temporal_accessor
Check if a property name is a valid temporal accessor.
is_temporal_string
Check if a string looks like a temporal value (date, time, datetime).
parse_datetime_utc
Parse a datetime string into a DateTime<Utc>.
parse_datetime_with_tz
Parse a datetime string and extract date, time, and timezone info.
parse_duration_from_value
Parse a duration from a Value, handling temporal durations, ISO 8601 strings, and integer microseconds.
parse_duration_to_cypher
Parse a duration string to a CypherDuration with preserved components.
parse_duration_to_micros
Parse a duration string to microseconds.