finos / morphir-elm / Morphir.SDK.LocalTime

This module adds the definition of basic time without time zones.

Types


type alias LocalTime =
Time.Posix

Concept of time without time zones.

Time Math

addHours : Basics.Int -> LocalTime -> LocalTime

Add the given hours to a given time

addMinutes : Basics.Int -> LocalTime -> LocalTime

Add the given minutes to a given time.

addSeconds : Basics.Int -> LocalTime -> LocalTime

Add the given seconds to a given time.

diffInHours : LocalTime -> LocalTime -> Basics.Int

Find the difference of give times in hours

diffInMinutes : LocalTime -> LocalTime -> Basics.Int

Find the difference of give times in minutes

diffInSeconds : LocalTime -> LocalTime -> Basics.Int

Find the difference of give times in minutes

Constructors

fromISO : String -> Maybe LocalTime

Construct a LocalTime based on ISO formatted string. Opportunity for error denoted by Maybe return type.

fromMilliseconds : Basics.Int -> LocalTime

Construct a LocalTime based on number of milliseconds from epoch. Opportunity for error denoted by Maybe return type.