m3e/ymd
Types
Values
pub fn from_string(input: String) -> Result(Ymd, String)
from_string parses a Ymd value from a string, returning a Result. The string must be in the format yyyy-mm-dd, with valid year, month, and day values.
pub fn new(
year: Int,
month: Int,
day: Int,
) -> Result(Ymd, String)
new creates a Ymd value from year, month, and day integers, returning a Result. The year must be between 1800 and 2500, inclusive. The month must be between 1 and 12, inclusive. The day must be between 1 and the number of days in the given month and year, inclusive.
pub fn to_string(d: Ymd) -> String
to_string converts a Ymd value to a string in the format yyyy-mm-dd.