Created
January 22, 2017 21:36
-
-
Save maticzav/1fbe4f313416e7c0276a01e1b3708014 to your computer and use it in GitHub Desktop.
Elm - get beginning of the day from epoch time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Time exposing (Time) | |
-- 2017-01-22T17:18:02.921Z -> 2017-01-22T00:00:00.000Z | |
today : Time -> Time | |
today time = | |
time - (toFloat <| rem (round time) (round <| 24.0 * Time.hour)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment