mendraw/mendix/date
Converts between Mendix date values and JavaScript dates.
Types
Values
pub fn create(
year year: Int,
month month: Int,
day day: Int,
hours hours: Int,
minutes minutes: Int,
seconds seconds: Int,
milliseconds milliseconds: Int,
) -> JsDate
Creates a date from calendar and clock components.
pub fn from_input_value(
date_string date_string: String,
) -> option.Option(JsDate)
Parses a date from an HTML input value.
pub fn from_iso(iso_string iso_string: String) -> JsDate
Parses an ISO-8601 date string.
pub fn from_timestamp(ms ms: Int) -> JsDate
Creates a date from a Unix timestamp.
pub fn to_input_value(date date: JsDate) -> String
Formats a date for an HTML date or time input.
pub fn to_string(date date: JsDate) -> String
Returns the JavaScript string representation of a date.
pub fn to_timestamp(date date: JsDate) -> Int
Returns the Unix timestamp for a date.