mo

mo() copy to clipboard

Return month as text.

The output format can be customized with set_month_format.

If the format is "number", a leading zero is not be inserted to the output.To prepend leading zero, give true to set_leading_zero.

Result

text

Example
tell script "XDate"'s make_with("2018/1/1")
log mo() -- "1"
set_leading_zero(true)
log mo() -- "01"
set_month_format("long")
log mo() -- "January"
set_month_format("short")
log mo() -- "Jan"
end tell