widget/mendix/date

Types

pub type JsDate

Values

pub fn create(
  year: Int,
  month: Int,
  day: Int,
  hours: Int,
  minutes: Int,
  seconds: Int,
  milliseconds: Int,
) -> JsDate

날짜/시간 요소로 생성 (month: 1-12)

pub fn day(date: JsDate) -> Int

일 (1-31)

pub fn day_of_week(date: JsDate) -> Int

요일 (0=일요일, 1=월요일, …, 6=토요일)

pub fn from_iso(iso_string: String) -> JsDate

ISO 8601 문자열로 생성

pub fn from_timestamp(ms: Int) -> JsDate

Unix 타임스탬프(밀리초)로 생성

pub fn hours(date: JsDate) -> Int

시 (0-23)

pub fn milliseconds(date: JsDate) -> Int

밀리초 (0-999)

pub fn minutes(date: JsDate) -> Int

분 (0-59)

pub fn month(date: JsDate) -> Int

월 (1-12, Gleam 기준 1-based)

pub fn now() -> JsDate

현재 시각

pub fn seconds(date: JsDate) -> Int

초 (0-59)

pub fn to_iso(date: JsDate) -> String

ISO 8601 문자열로 변환

pub fn to_string(date: JsDate) -> String

사람이 읽기 쉬운 문자열로 변환

pub fn to_timestamp(date: JsDate) -> Int

Unix 타임스탬프(밀리초) 반환

pub fn year(date: JsDate) -> Int

연도 (4자리)

Search Document