set_leading_zero

set_leading_zero(a_flag) copy to clipboard

set whether month, day, hour, minute and second have a leading zero or not.

The default value is false.

Result

XDate

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