# m3e/time

# Types

## Time

opaque </>

Time is a time

    pub opaque type Time

# Values

## default

</>

    pub const default: Time

## from_string

</>

    pub fn from_string(input: String) -> Result(Time, String)

from_string creates a new Time, returning an Error if the supplied string is invalid

## less_than

</>

    pub fn less_than(time1: Time, time2: Time) -> Bool

less_than returns true if the first time is less than the second time

## new

</>

    pub fn new(
      hour: Int,
      minute: Int,
      second: Int,
    ) -> Result(Time, String)

new creates a new Time, returning an Error if the supplied values are invalid

## to_hhmm

</>

    pub fn to_hhmm(t: Time) -> String

to_hhmm converts a Time to a string in the format hh:mm (i.e.truncating the seconds)

## to_string

</>

    pub fn to_string(t: Time) -> String

to_string converts a Time to a string in the format hh:mm:ss

✨