Quick Code Snippet

If you are using Javascript to get the current date, you may need to add the ordinal on the date. (the bit that goes st, nd, rd, th).

So here is a quick functio to handle that

function getDateOrdinal(date_numeric)
{
	var s='th';
	if(date_numeric===1 || date_numeric==21 || date_numeric==31) s='st';
	if(date_numeric===2 || date_numeric==22) s='nd';
	if(date_numeric===3 || date_numeric==23) s='rd';
	return date_numeric+s;
}
Notes

other news is designed by manasto jones, powered by tumblr and best viewed with safari.