m3e/day
Types
Values
pub fn from_string(
dd: String,
mm: String,
yy: String,
) -> Result(Day, String)
from_string parses a day from a string in the format “DD”. This constructor takes a day, month, and year as separate strings and returns a Result. It requires the day, month, and year to prevent an invalid day from being created, for example the 29th February in a Leap Year, or the 32nd day of a month.
pub fn new(day: Int, m: Int, y: Int) -> Result(Day, String)
new creates a Day value from a day, month, and year. This constructor takes a day, a Month, and a Year and returns a Result. It requires the day, month, and year to prevent an invalid day from being created, for example the 29th February in a Leap Year, or the 32nd day of a month.