m3e/month

Types

Month represents a month of the year, between 1 and 12, inclusive.

pub type Month {
  Month(month: Int)
}

Constructors

  • Month(month: Int)

Values

pub const default: Month
pub fn from_string(m: String) -> Result(Month, String)

from_string creates a Month value from a numeric string representation, returning a Result. The string must be a two-digit number between 01 and 12, inclusive.

pub fn new(month: Int) -> Result(Month, String)

new creates a Month value from an integer month, returning a Result. The month must be between 1 and 12, inclusive.

pub fn to_string(m: Month) -> String

to_string converts a Month value to a numeric string representation

Search Document