andrewMacmurray / elm-concurrent-task / ConcurrentTask.Time

Drop in replacements for elm/time's's Tasks.

The JavaScript runner has these tasks builtin by default. If needed they can be overridden like so:

NOTE: The custom examples are the same as the built-in implementations.

import * as ConcurrentTask from "

now : ConcurrentTask x Time.Posix

Get the POSIX time at the moment when this task is run.

A direct replacement for elm/time's Time.now.

here : ConcurrentTask x Time.Zone

Produce a Zone based on the current UTC offset.

A direct replacement for elm/time's Time.here.

getZoneName : ConcurrentTask x Time.ZoneName

Use Intl.DateTimeFormat().resolvedOptions().timeZone to try to get names like Europe/Moscow or America/Havana.

A direct replacement for elm/time's Time.getZoneName.