본문으로 건너뛰기

DateTime():month()

DateTime 객체의 월을 반환합니다. (1부터 시작, 1월이 1)

시그니처

month(): number

반환값

  • 유형: number
  • 월 (1-12).

예시

local date = DateTime(2024, 3, 15) -- 2024315
local month = date:month()
toast("월: " .. month) -- 출력: 3