View Source Tempus.Sigils (Tempus v0.5.0)

Handy sigils to instantiate Tempus.Slot

Link to this section Summary

Functions

Handles the sigil ~I for Tempus.Slot. It returns a slot without interpolations and without escape characters, except for the escaping of the closing sigil character itself.

Link to this section Functions

Link to this macro

sigil_I(arg, modifiers)

View Source (macro)

Handles the sigil ~I for Tempus.Slot. It returns a slot without interpolations and without escape characters, except for the escaping of the closing sigil character itself.

Examples

iex> import Tempus.Sigils
iex> ~I(2021-03-30T06:35:40Z|2021-03-30T06:36:00Z)
%Tempus.Slot{from: ~U[2021-03-30 06:35:40Z], to: ~U[2021-03-30 06:36:00Z]}
iex> ~I(2021-03-30|2021-03-31)d
%Tempus.Slot{from: ~U[2021-03-30 00:00:00.000000Z], to: ~U[2021-03-31 23:59:59.999999Z]}
iex> ~I(2021-03-30)d
%Tempus.Slot{from: ~U[2021-03-30 00:00:00.000000Z], to: ~U[2021-03-30 23:59:59.999999Z]}