var month = 13if (month < 1 || month > 12) { month = Number.NaN msgText.ReplaceSelection("Month must be between 1 and 12.")}