2,733
edits
Red Leader (talk | contribs) m (Fix issue whereby it would output "11st".) |
|||
Line 405: | Line 405: | ||
// Returns the correct ordinal adjective | // Returns the correct ordinal adjective | ||
function ordAdj(date){ | function ordAdj(date){ | ||
date = date.toString() | date = date.toString(); | ||
if(date == "1"){ | if(date == "11" || date == "12" || date == "13"){ | ||
return "th"; | |||
}else if(date.substr(1) == "1"){ | |||
return "st"; | return "st"; | ||
}else if(date == "2"){ | }else if(date.substr(1) == "2"){ | ||
return "nd"; | return "nd"; | ||
}else if(date == "3"){ | }else if(date.substr(1) == "3"){ | ||
return "rd"; | return "rd"; | ||
}else{ | }else{ |