[{"name":"Hour","comment":" This module provides a representation of local times in Elm.\n\nIt is called Hour to avoid confusion with elm/time module and to live in a\ndifferent namespace.\n\nThe API is based on justinmimbs/date, and both packages work well together to\nrepresent both dates and times.\n\n\n# Types\n\n@docs Time\n\n\n# Create\n\n@docs now, time, fromParts, fromPosix, fromIsoString, fromMillis, fromSeconds\n\n\n# Extract\n\n@docs hours, minutes, seconds, millis, parts\n\n\n# Conversions\n\n@docs toIsoString, toMillis, toSeconds\n\n\n# Formatting\n\n@docs format, Language, formatWithLanguage\n\n\n# Arithmetic\n\n@docs Unit, add, diff\n\n\n# Rounding and intervals\n\n@docs Interval, ceiling, floor, range\n\n\n# Ordering\n\n@docs compare, isBetween, min, max, clamp\n\n\n# Encoding\n\n@docs decoder, encode\n\n","unions":[{"name":"Interval","comment":" Represent a time interval\n\n```text\n    Hour -- 1 hour\n    Half -- 30 minutes\n    Quarter -- 15 minutes\n    Minute -- 1 minute\n    Second -- 1 second\n    Millisecond -- 1 millisecond\n```\n\n","args":[],"cases":[["Hour",[]],["Half",[]],["Quarter",[]],["Minute",[]],["Second",[]],["Millisecond",[]]]},{"name":"Time","comment":" Represents a local time\n","args":[],"cases":[["T",["{ hours : Basics.Int, minutes : Basics.Int, seconds : Basics.Int, millis : Basics.Int }"]]]},{"name":"Unit","comment":" Represent a unit of time\n\nUsed in functions to construct explicit time intervals.\n\n","args":[],"cases":[["Hours",[]],["Minutes",[]],["Seconds",[]],["Milliseconds",[]]]}],"aliases":[{"name":"Language","comment":" Represent a supported language\n","args":[],"type":"{ am : String.String, pm : String.String }"}],"values":[{"name":"add","comment":" Get past or future time by adding a number of units to it.\n\n    time ( 9, 0, 0 )\n        |> add Hours 1\n        |> toIsoString\n    --> \"10:00\"\n\n","type":"Hour.Unit -> Basics.Int -> Hour.Time -> Hour.Time"},{"name":"ceiling","comment":" Round up a time to the beginning of the closest interval.\n\nThe resulting time will be greater than or equal to the one provided.\n\nAny fractional time will be rounded up to the next whole interval.\n\n    time ( 9, 0, 1 )\n        |> Hour.ceiling Hour\n        |> toIsoString\n    --> \"10:00\"\n\nBut exact times will be unchanged:\n\n    time ( 9, 0, 0 )\n        |> Hour.ceiling Hour\n        |> toIsoString\n    --> \"09:00\"\n\n","type":"Hour.Interval -> Hour.Time -> Hour.Time"},{"name":"clamp","comment":" Clamp a time within a range.\n\n    clamp start end appointment\n        (time ( 9, 0, 0 )) -- start\n        (time ( 17, 0, 0 )) -- end\n        (time ( 18, 0, 0 )) -- appointment\n        |> toIsoString\n    -- 17:00:00\n\n","type":"Hour.Time -> Hour.Time -> Hour.Time -> Hour.Time"},{"name":"compare","comment":" Compare two times. This can be used as the compare function for List.sortWith\n\n    List.sortWith Hour.compare [ time ( 9, 0, 0 ), time ( 8, 0, 0 ) ]\n        |> List.map toIsoString\n    --> [ \"08:00\", \"09:00\" ]\n\n","type":"Hour.Time -> Hour.Time -> Basics.Order"},{"name":"decoder","comment":" JSON decoder for Time\n","type":"Json.Decode.Decoder Hour.Time"},{"name":"diff","comment":" Get the difference between two times, as a number of whole units.\n\n    diff Minutes\n        (time ( 10, 0, 0 ))\n        (time ( 8, 0, 0 ))\n        --> 120\n\n","type":"Hour.Unit -> Hour.Time -> Hour.Time -> Basics.Int"},{"name":"encode","comment":" JSON encoder for Time\n","type":"Hour.Time -> Json.Encode.Value"},{"name":"floor","comment":" Round down a time to the beginning of the closest interval.\n\nThe resulting time will be less than or equal to the one provided.\n\n    time ( 9, 20, 1 )\n        |> Hour.floor Quarter\n        |> toIsoString\n    --> \"09:15\"\n\n","type":"Hour.Interval -> Hour.Time -> Hour.Time"},{"name":"format","comment":" Format a time using a string as a template.\n\n    format \"EEEE, d MMMM y\" (fromOrdinalDate 1970 1)\n        == \"Thursday, 1 January 1970\"\n\nAlphabetic characters in the template represent time information; the number of\ntimes a character is repeated specifies the form of a name or the padding of a number.\n\nAlphabetic characters can be escaped within single-quotes; a single-quote can\nbe escaped as a sequence of two single-quotes, whether appearing inside or\noutside an escaped sequence.\n\nTemplates are based on Date Format Patterns in [Unicode Technical Standard #35](https://www.unicode.org/reports/tr35/tr35-43/tr35-dates.html#Date_Format_Patterns).\nOnly the following subset of formatting characters are available:\n\n    ```\n    \"h\" -- The hour, using a 12-hour clock from 1 to 12.\n    \"hh\" -- The hour, using a 12-hour clock from 01 to 12.\n    \"H\" -- The hour, using a 24-hour clock from 0 to 23.\n    \"HH\" -- The hour, using a 24-hour clock from 00 to 23.\n    \"m\" -- The minute, from 0 through 59.\n    \"mm\" -- The minute, from 00 through 59.\n    \"s\" -- The second, from 0 through 59.\n    \"ss\" -- The second, from 00 through 59.\n    \"a\" -- The first character of the AM/PM designator.\n    \"aa\" -- The AM/PM designator.\n    \"f\" -- The tenths of a second in a date and time value.\n    \"ff\" -- The hundredths of a second in a date and time value.\n    \"fff\" -- The milliseconds in a date and time value.\n    ```\n\n    format \"hh:mmaa 'and' s 'seconds'\" (time (13, 15, 42))\n        --> \"01:15pm. and 42 seconds\"\n\n","type":"String.String -> Hour.Time -> String.String"},{"name":"formatWithLanguage","comment":" Format a time using a string as a template, with a specific language.\n","type":"Hour.Language -> String.String -> Hour.Time -> String.String"},{"name":"fromIsoString","comment":" Parse iso8601 time string to Time.\n\nExpect hours in the format \"HH:MM:SS\" or \"HH:MM:SS.mmm\".\n\n    fromIsoString \"12:30:05.500\"\n        |> Maybe.map parts\n    --> Just { hours = 12, minutes = 30, seconds = 5, millis = 500 }\n\n","type":"String.String -> Maybe.Maybe Hour.Time"},{"name":"fromMillis","comment":" Create a Time instance from duration from the start of the day in milliseconds.\n\n    fromMillis (12 * 60 * 60 * 1000)\n        |> toIsoString\n    --> \"12:00\"\n\n","type":"Basics.Int -> Hour.Time"},{"name":"fromParts","comment":" Creates a new Time instance with milliseconds.\n\n    fromParts { hours = 13, minutes = 5, seconds = 0 , millis = 1}\n        |> toIsoString\n    --> \"13:05:00.001\"\n\nAll values are normalized, so you can pass numbers in invalid ranges and they will\nwrap up or down to correct values.\n\n    fromParts {hours = -2, minutes = 100, seconds = 61, millis = 1500}\n        |> parts\n        --> {hours = 23, minutes = 41, seconds = 2, millis = 500}\n\n","type":"{ hours : Basics.Int, minutes : Basics.Int, seconds : Basics.Int, millis : Basics.Int } -> Hour.Time"},{"name":"fromPosix","comment":" Create a Time instance from a Posix timestamp.\n\n    import Time\n\n    fromPosix Time.utc (Time.millisToPosix (12 * 60 * 60 * 1000))\n        |> toIsoString\n    --> \"12:00\"\n\n","type":"Time.Zone -> Time.Posix -> Hour.Time"},{"name":"fromSeconds","comment":" Create a Time instance from duration from the start of the day in seconds.\n\n    fromSeconds (12 * 60 * 60)\n        |> toIsoString\n    --> \"12:00\"\n\n","type":"Basics.Int -> Hour.Time"},{"name":"hours","comment":" Extracts the hours from a Time\n\n    time (12, 30, 5)\n        |> hours\n    --> 12\n\n","type":"Hour.Time -> Basics.Int"},{"name":"isBetween","comment":" Test if a time is within a range, inclusive, of the range values.\n\n    time ( 8, 30, 0 )\n        |> isBetween (time ( 8, 0, 0 )) (time ( 9, 0, 0 ))\n    --> True\n\n","type":"Hour.Time -> Hour.Time -> Hour.Time -> Basics.Bool"},{"name":"max","comment":" Get the larger of two times.\n\n    Hour.max (time ( 8, 0, 0 )) (time ( 9, 0, 0 ))\n        |> toIsoString\n    --> \"09:00\"\n\n","type":"Hour.Time -> Hour.Time -> Hour.Time"},{"name":"millis","comment":" Extracts the milliseconds from a Time\n\n    fromParts {hours = 12, minutes = 30, seconds = 5, millis = 500}\n            |> millis\n        --> 500\n\n","type":"Hour.Time -> Basics.Int"},{"name":"min","comment":" Get the smaller of two times.\n\n    Hour.min (time ( 8, 0, 0 )) (time ( 9, 0, 0 ))\n        |> toIsoString\n    --> \"08:00\"\n\n","type":"Hour.Time -> Hour.Time -> Hour.Time"},{"name":"minutes","comment":" Extracts the minutes from a Time\n\n    time (12, 30, 5)\n            |> minutes\n        --> 30\n\n","type":"Hour.Time -> Basics.Int"},{"name":"now","comment":" Gets the current time in the local timezone.\n","type":"Task.Task x Hour.Time"},{"name":"parts","comment":" Extracts all components of a Time as a record\n\n    fromParts {hours = 12, minutes = 30, seconds = 5, millis = 500}\n            |> parts\n        --> {hours = 12, minutes = 30, seconds = 5, millis = 500}\n\n","type":"Hour.Time -> { hours : Basics.Int, minutes : Basics.Int, seconds : Basics.Int, millis : Basics.Int }"},{"name":"range","comment":" Create a list of times, at rounded intervals, increasing by a step value,\nbetween two times.\n\nThe list will start on or after the first time, and end before the second time.\n\n    range Half 3 (time ( 9, 0, 0 )) (time ( 17, 0, 0 ))\n        |> List.map toIsoString\n        --> [ \"09:00\", \"10:30\", \"12:00\", \"13:30\", \"15:00\", \"16:30\" ]\n\nNotice the final time is not present in the list.\n\n","type":"Hour.Interval -> Basics.Int -> Hour.Time -> Hour.Time -> List.List Hour.Time"},{"name":"seconds","comment":" Extracts the seconds from a Time\n\n    time (12, 30, 5)\n            |> seconds\n        --> 5\n\n","type":"Hour.Time -> Basics.Int"},{"name":"time","comment":" Creates a new Time instance from a tuple of hours, minutes, and seconds.\n\nValues are normalized to the range of 0-23 for hours, 0-59 for minutes, and\n0-59 for seconds.\n\n    time (13, 5, 0)\n        |> toIsoString\n    --> \"13:05\"\n\nOut or range values are normalized:\n\n    time (12, 60, 60)\n        |> toIsoString\n    --> \"13:01\"\n\n","type":"( Basics.Int, Basics.Int, Basics.Int ) -> Hour.Time"},{"name":"toIsoString","comment":" Converts a Time to ISO 8601 strings.\n\nTimes are rendered as \"HH:MM:SS.mmm\", where the seconds and milliseconds parts\nare ommited if possible.\n\n    time (12, 30, 5)\n        |> toIsoString\n    --> \"12:30:05\"\n\n    time (12, 30, 0)\n        |> toIsoString\n    --> \"12:30\"\n\n","type":"Hour.Time -> String.String"},{"name":"toMillis","comment":" Convert time to milliseconds ellapsed from the start of the day\n\n    fromParts {hours = 1, minutes = 0, seconds = 1, millis = 500}\n        |> toMillis\n    --> 3601500\n\n","type":"Hour.Time -> Basics.Int"},{"name":"toSeconds","comment":" Convert time to seconds ellapsed from the start of the day\n\n    fromParts {hours = 1, minutes = 0, seconds = 1, millis = 500}\n        |> toSeconds\n    --> 3601\n\n","type":"Hour.Time -> Basics.Int"}],"binops":[]},{"name":"Hour.I18n","comment":" This module declares all supported languages and their formatting information.\n\n\n## Supported languages\n\n@docs en\n\n","unions":[],"aliases":[],"values":[{"name":"en","comment":" en-US support\n","type":"Hour.Language"}],"binops":[]}]