scriptorium/utils/time

Types

pub type Time {
  Time(hours: hour.Hour, minutes: minute.Minute)
}

Constructors

Values

pub fn compare(a: Time, b: Time) -> order.Order

Compare if a is before (lower than) than b.

pub fn format(time: Time, context: context.Context) -> String

Format a time to a string.

pub fn format_iso(time: Time) -> String

Format a time to an hh:mm 24 hour string.

pub fn nil_time() -> Time

Get a time at hour 0 and minute 0.

pub fn parse(str: String) -> Result(Time, Nil)

Parse a time from an hh:mm format string.

Search Document