allo-media/elm-daterange-picker/2.1.0

NOTE: the latest version is 4.0.2

Renamed to n1k0/elm-daterange-picker. It is published under that name, and new versions come out there.

Versions published as allo-media/elm-daterange-picker still install under that name. 8 versions of 8 come from the new location (see their notes).

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/n1k0/elm-daterange-picker.

What we checked: The repo moved to github.com/n1k0/elm-daterange-picker. Rebuilt with git archive from commit a6f273b52f63 of https://github.com/n1k0/elm-daterange-picker (zip prefix allo-media-elm-daterange-picker-a6f273b/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 d4db22513a63e83ccb6b0a48498e0fdaa773543d.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/allo-media/elm-daterange-picker/zipball/2.1.0/

DateRangePicker.Range

Date range management.

Range

type Range

A time range between two Time.Posix, always expressed in UTC.

create : Posix -> Posix -> Range

Creates a Range from two Posix timestamps.

Notes:

  • args order is not important as it's internally managed.
  • A Range is always treated as expressed in UTC.
beginsAt : Range -> Posix

Retrieves the Posix the Range begins at.

endsAt : Range -> Posix

Retrieves the Posix the Range ends at.

Helpers

between : Posix -> Range -> Bool

Checks if a Time.Posix is comprised within a Range.

days : Range -> Int

Computes the number of days in a Range, floored.

format : Zone -> Range -> String

Formats a Range in simple fashion.

Conversion

decode : Decoder Range

Decodes a Range from JSON.

encode : Range -> 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 -> ( Posix, Posix )

Converts a Range into a Tuple.