birl/time

Types

pub opaque type Time
pub type WeekDay {
  Monday
  Tuesday
  Wednesday
  Thursday
  Friday
  Saturday
  Sunday
}

Constructors

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday

Functions

pub fn add(value: Time, duration: Duration) -> Time
pub fn compare(a: Time, b: Time) -> Order
pub fn difference(a: Time, b: Time) -> Duration
pub fn from_iso(value: String) -> Result(Time, Nil)
pub fn from_parts(date: #(Int, Int, Int), time: #(Int, Int, Int)) -> Time
pub fn get_weekday(value: Time) -> WeekDay
pub fn now() -> Time
pub fn subtract(value: Time, duration: Duration) -> Time
pub fn to_iso(value: Time) -> String
pub fn to_parts(value: Time) -> #(
  #(Int, Int, Int),
  #(Int, Int, Int),
)
Search Document