month number for array index (1=Jan, 12=Dec)
var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
"Aug", "Sep", "Oct", "Nov", "Dec"];
if (months[mo] !== undefined) {
return months[mo];
} else {
throw new UserException("Invalid Month Number");
}
}
function getDayName(da) {
da = da-1; // Adjust day number for array index
var days = ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"];
if (days[da] !== undefined) {
return days[da];
} else {
throw new UserException("Invalid Day Number");
}
}