finos/morphir-elm/22.0.0

NOTE: the latest version is 22.0.2

Formerly Morgan-Stanley/morphir-elm. Search finds this package by either name.

Morphir.SDK.LocalTime

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

Types

type alias LocalTime =
Posix

Concept of time without time zones.

Time Math

addHours : Int -> LocalTime -> LocalTime

Add the given hours to a given time

addMinutes : Int -> LocalTime -> LocalTime

Add the given minutes to a given time.

addSeconds : Int -> LocalTime -> LocalTime

Add the given seconds to a given time.

diffInHours : LocalTime -> LocalTime -> Int

Find the difference of give times in hours

diffInMinutes : LocalTime -> LocalTime -> Int

Find the difference of give times in minutes

diffInSeconds : LocalTime -> LocalTime -> 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 : Int -> LocalTime

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