tempo/offset

Constants

pub const utc: Offset

Functions

pub fn from_string(offset: String) -> Result(Offset, Error)
pub fn literal(offset: String) -> Offset

Useful for declaring offset literals that you know are valid within your program. Will crash if an invalid offset is provided.

pub fn new(offset_minutes minutes: Int) -> Result(Offset, Error)
pub fn to_string(offset: Offset) -> String

Will not return “Z” for a zero offset because it is probably not what the user wants without the context of a full datetime. Datetime modules building on this should cover formatting for Z themselves.

Search Document