Using it is quite simple:
var date = getDate(); var format = 'dd-MM-yyyy hh:mm:ss'; var formattedDate = $.format.date(date, format); alert(formattedDate); //alerts 02-01-2012 12:23:41