Zodish.Type.DateTime (zodish v0.2.4)

View Source

This module describes a Zodish date-time type.

Summary

Functions

Creates a new DateTime type.

Types

t()

@type t() :: %Zodish.Type.DateTime{
  after:
    Zodish.Option.t(
      DateTime.t()
      | {n :: integer(), unit(), :from_now}
      | mfa()
      | (-> DateTime.t())
    )
    | nil,
  before:
    Zodish.Option.t(
      DateTime.t()
      | {n :: integer(), unit(), :from_now}
      | mfa()
      | (-> DateTime.t())
    )
    | nil,
  coerce: boolean()
}

unit()

@type unit() ::
  :millisecond | :second | :minute | :hour | :day | :week | :month | :year

Functions

new(opts \\ [])

Creates a new DateTime type.