function dateFormat(date, mask, delim, pad){
    if(delim === undefined || delim == null) { delim = '-'; };
    if(pad === undefined || pad == null) { pad = true; };
    var dateStr = '';
    switch(mask){
        case 'yyyymmdd':
            dateStr = date.getFullYear() + delim + padNumber(date.getMonth() + 1) + delim + padNumber(date.getDate());
            break;
        case 'mmdd':
            dateStr = padNumber(date.getMonth() + 1) + delim + padNumber(date.getDate());
            break;
        case 'mmddyyyy':
            dateStr = padNumber(date.getMonth() + 1) + delim + padNumber(date.getDate()) + delim + date.getFullYear();
            break;
        case 'mmmmdd':
            dateStr = getMonthName(date) + delim + date.getDate();
            break;
        case 'mmmmyyyy':
            dateStr = getMonthName(date) + delim + date.getFullYear();
            break;
        default:
            alert('Unrecognized Mask: ' + mask);
            break;
    }
    return dateStr;
}
/*
**    Description:    Crude manual approach to formatting a dateTime object.
**    Arguments:        date (dateTime) - the date value to be formatted
**                    mask (string) - the desired output format of the date
**                    delim (character) [optional] - the delimiter that is used between the various date parts, defaults to '-'
**                    pad (boolean) [optional] - flag indicating whether single digit date parts should be forced to two characters, defaults to 'true'
*/
Crude manual approach to formatting a dateTime object.
Crude manual approach to formatting a dateTime object .
function dateFormat(date, mask, delim, pad){
    if(delim === undefined || delim == null) { delim = '-'; };
    if(pad === undefined || pad == null) { pad = true; };
    var dateStr = '';
    switch(mask){
        case 'yyyymmdd':
            dateStr = date.getFullYear() + delim + padNumber(date.getMonth() + 1) + delim + padNumber(date.getDate());
            break;
        case 'mmdd':
            dateStr = padNumber(date.getMonth() + 1) + delim + padNumber(date.getDate());
            break;
        case 'mmddyyyy':
            dateStr = padNumber(date.getMonth() + 1) + delim + padNumber(date.getDate()) + delim + date.getFullYear();
            break;
        case 'mmmmdd':
            dateStr = getMonthName(date) + delim + date.getDate();
            break;
        case 'mmmmyyyy':
            dateStr = getMonthName(date) + delim + date.getFullYear();
            break;
        default:
            alert('Unrecognized Mask: ' + mask);
            break;
    }
    return dateStr;
}
function dateFormat ( date , mask , delim , pad ) { if ( delim === undefined || delim == null ) { delim = '-' ; } ; if ( pad === undefined || pad == null ) { pad = true ; } ; var dateStr = '' ; switch ( mask ) { case 'yyyymmdd' : dateStr = date . getFullYear ( ) + delim + padNumber ( date . getMonth ( ) + 1 ) + delim + padNumber ( date . getDate ( ) ) ; break ; case 'mmdd' : dateStr = padNumber ( date . getMonth ( ) + 1 ) + delim + padNumber ( date . getDate ( ) ) ; break ; case 'mmddyyyy' : dateStr = padNumber ( date . getMonth ( ) + 1 ) + delim + padNumber ( date . getDate ( ) ) + delim + date . getFullYear ( ) ; break ; case 'mmmmdd' : dateStr = getMonthName ( date ) + delim + date . getDate ( ) ; break ; case 'mmmmyyyy' : dateStr = getMonthName ( date ) + delim + date . getFullYear ( ) ; break ; default : alert ( 'Unrecognized Mask: ' + mask ) ; break ; } return dateStr ; }
Description:    Crude manual approach to formatting a dateTime object.
Description : Crude manual approach to formatting a dateTime object .