ESpec.DatesTimes.DateTimeProtocol protocol (ESpec v1.10.0)

View Source

This protocol defines the API for functions which take a Date, NaiveDateTime, or DateTime as input.

Summary

Types

t()

All the types that implement this protocol.

Functions

Convert a date/time value to gregorian microseconds (microseconds since the start of year zero)

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

to_comparison_units(datetime)

@spec to_comparison_units(ESpec.DatesTimes.Types.calendar_types()) ::
  non_neg_integer() | {:error, term()}

Convert a date/time value to gregorian microseconds (microseconds since the start of year zero)