Interval.NaiveDateTimeInterval (Interval v2.0.1)

View Source

Represents a continuous interval containing NaiveDateTime

Defines a struct with two fields, left and right, representing the left and right endpoints of the interval. The endpoint fields are of type t:Interval.endpoint(NaiveDateTime)

This module delegates most functionality to the Interval module.

Summary

Types

t()

An interval of point type NaiveDateTime

Types

point()

@type point() :: term()

t()

@type t() :: %Interval.NaiveDateTimeInterval{left: term(), right: term()}

An interval of point type NaiveDateTime

Functions

adjacent?(a, b)

See Interval.adjacent?/2.

adjacent_left_of?(a, b)

See Interval.adjacent_left_of?/2.

adjacent_right_of?(a, b)

See Interval.adjacent_right_of?/2.

contains?(a, b)

See Interval.contains?/2.

contains_point?(a, x)

See Interval.contains_point?/2.

difference(a, b)

See Interval.difference/2.

discrete?()

@spec discrete?() :: false

Callback implementation for Interval.Behaviour.discrete?/0.

embed_as(_)

Callback implementation for Ecto.Type.embed_as/1.

empty?(interval)

See Interval.empty?/1.

equal?(term1, term2)

Callback implementation for Ecto.Type.equal?/2.

format(a)

See Interval.format/1.

inclusive_left?(interval)

See Interval.inclusive_left?/1.

inclusive_right?(interval)

See Interval.inclusive_right?/1.

intersection(a, b)

See Interval.intersection/2.

left(interval)

See Interval.left/1.

new(opts \\ [])

Callback implementation for Interval.Behaviour.new/1.

new(left, right, bounds \\ "[)")

@spec new(
  left :: point() | nil | :unbounded | :empty,
  right :: point() | nil | :unbounded | :empty,
  bounds :: Interval.strbounds()
) :: t()

Callback implementation for Interval.Behaviour.new/3.

overlaps?(a, b)

See Interval.overlaps?/2.

parse(str)

partition(a, x)

See Interval.partition/2.

right(interval)

See Interval.right/1.

strictly_left_of?(a, b)

See Interval.strictly_left_of?/2.

strictly_right_of?(a, b)

See Interval.strictly_right_of?/2.

unbounded_left?(interval)

See Interval.unbounded_left?/1.

unbounded_right?(interval)

See Interval.unbounded_right?/1.

union(a, b)

See Interval.union/2.