メインコンテンツまでスキップ

DateTime():month()

DateTime オブジェクトの月を返します。(1始まり、1月は 1)

シグネチャ

month(): number

戻り値

  • 型: number
  • 月(1〜12)。

local date = DateTime(2024, 3, 15) -- 2024315
local month = date:month()
toast("Month: " .. month) -- 出力: 3