common.js
// gets a day suffix like st, th, nd
gets a day suffix like st, th, nd
gets a day suffix like st th nd
function GetDaySuffix(number)
{
    if((number > 3 && number < 21) || (number > 24 && number < 31))
    {
        return number + "th";
    }
    number = number + "";
    switch(number.substr(number.length - 1, 1))
    {
        case "1" : return number + "st";
        case "2" : return number + "nd";
        case "3" : return number + "rd";
        case "4" : return number + "th";
    }    
}
function GetDaySuffix ( number ) { if ( ( number > 3 && number < 21 ) || ( number > 24 && number < 31 ) ) { return number + "th" ; } number = number + "" ; switch ( number . substr ( number . length - 1 , 1 ) ) { case "1" : return number + "st" ; case "2" : return number + "nd" ; case "3" : return number + "rd" ; case "4" : return number + "th" ; } }
gets a day suffix like st, th, nd
gets a day suffix like st th nd