View Source Arke.Core.Parameter.DateTime (Arke v1.1.33)
Module that define the struct of a DateTime by extending the Arke.Core.Parameter.base_parameters().
accepted-values
Accepted values
Date accepts the following format as values:
string => "YYYY-MM-DDTHH:MM:SSZ" | "YYYY-MM-DD HH:MM:SSZ" | "YYYY-MM-DD HH:MM:SS" (separator must be - hyphen for Date and colon : for Time)
sigil => ~U[YYYY-MM-DDTHH:MM:SSZ] | ~U[YYYY-MM-DD HH:MM:SSZ] | ~N[YYYY-MM-DDTHH:MM:SSZ] | ~N[YYYY-MM-DD HH:MM:SSZ] | ~N[YYYY-MM-DD HH:MM:SS] (separator must be - hyphen for Date and colon : for Time)
struct => %DateTime{} | %NaiveDateTime{}
The T separator is optional. If no offset is provided (Z will be added at the end)
{arke_struct} = Parameter.Date
element-added
Element added
default
=> values => default value
## Example
iex> params = [id: :time_test, default: "1999-12-12 09:08:07"]
...> Arke.Core.Parameter.new(%{type: :datetime, opts: params})
## Return
%Arke.Core.Parameter.DateTime{}