Date range management.
A time range between two
Time.Posix
.
create : Time.Zone -> Time.Posix -> Time.Posix -> Range
Creates a Range
from two Posix timestamps.
Note: Posix
args order is not important as it's internally managed.
beginsAt : Range -> Time.Posix
Retrieves the Posix the Range
begins at.
endsAt : Range -> Time.Posix
Retrieves the Posix the Range
ends at.
between : Time.Posix -> Range -> Basics.Bool
Checks if a Time.Posix
is comprised within a Range
.
days : Range -> Basics.Int
Computes the number of days in a Range
, floored.
format : Time.Zone -> Range -> String
Formats a Range
in simple fashion.
decode : Json.Decode.Decoder Range
Decodes a Range
from JSON.
encode : Range -> Json.Encode.Value
Encodes a Range
to JSON.
fromString : String -> Maybe Range
Extract a Range
from a String, where the two Posix timestamps are
encoded as UTC to Iso8601 format and joined with a ;
character.
toString : Range -> String
Turns a Range
into a String, where the two Posix timestamps are
encoded as UTC to Iso8601 format and joined with a ;
character.
toTuple : Range -> ( Time.Posix, Time.Posix )
Converts a Range
into a Tuple.