More sample date formatting

The code below is a sample to show the various functions that can be used for date formatting.

var now = new Date();
var MM = now.getMonth()+1;
var DD = now.getDate();
var YYYY = now.getFullYear();
var HH = now.getHours();
var NN = now.getMinutes();
var SS = now.getSeconds();
var slash = "/";
var colon = ":";
var formattedDate = MM + slash + DD + slash + YYYY + " " + HH + colon + NN + colon + SS;
alert (formattedDate);

A demo script can be downloaded here as well: sampleDateFormatting.gsl