plugins/calendar.js
function(milliseconds) {
	
			var formattedDate = '',
	
			self = this,
	
			dateObj = new Date(milliseconds),
	
			format = {
				d: function() {
					var day = format.j()
					return (day < 10) ? '0' + day : day
				},
				D: function() {
					return self.weekdays[format.w()].substring(0, 3)
				},
				j: function() {
					return dateObj.getDate()
				},
				l: function() {
					return self.weekdays[format.w()] + 'day'
				},
				S: function() {
					return self.suffix[format.j()] || 'th'
				},
				w: function() {
					return dateObj.getDay()
				},
				F: function() {
					return self._convertMonthIdx(format.n(), true)
				},
				m: function() {
					var month = format.n() + 1
					return (month < 10) ? '0' + month : month
				},
				M: function() {
					return self._convertMonthIdx(format.n(), false)
				},
				n: function() {
					return dateObj.getMonth()
				},
				Y: function() {
					return dateObj.getFullYear()
				},
				y: function() {
					return format.Y().substring(2, 4)
				}
			},
			formatPieces = this.dateFormat.split('')
			
			for(i = 0, x = formatPieces.length; i < x; i++) {
				formattedDate += format[formatPieces[i]] ? format[formatPieces[i]]() : formatPieces[i]
			}
	
			return formattedDate
		}
function(milliseconds) {
	
			var formattedDate = '',
	
			self = this,
	
			dateObj = new Date(milliseconds),
	
			format = {
				d: function() {
					var day = format.j()
					return (day < 10) ? '0' + day : day
				},
				D: function() {
					return self.weekdays[format.w()].substring(0, 3)
				},
				j: function() {
					return dateObj.getDate()
				},
				l: function() {
					return self.weekdays[format.w()] + 'day'
				},
				S: function() {
					return self.suffix[format.j()] || 'th'
				},
				w: function() {
					return dateObj.getDay()
				},
				F: function() {
					return self._convertMonthIdx(format.n(), true)
				},
				m: function() {
					var month = format.n() + 1
					return (month < 10) ? '0' + month : month
				},
				M: function() {
					return self._convertMonthIdx(format.n(), false)
				},
				n: function() {
					return dateObj.getMonth()
				},
				Y: function() {
					return dateObj.getFullYear()
				},
				y: function() {
					return format.Y().substring(2, 4)
				}
			},
			formatPieces = this.dateFormat.split('')
			
			for(i = 0, x = formatPieces.length; i < x; i++) {
				formattedDate += format[formatPieces[i]] ? format[formatPieces[i]]() : formatPieces[i]
			}
	
			return formattedDate
		}
function ( milliseconds ) { var formattedDate = '' , self = this , dateObj = new Date ( milliseconds ) , format = { d : function ( ) { var day = format . j ( ) return ( day < 10 ) ? '0' + day : day } , D : function ( ) { return self . weekdays [ format . w ( ) ] . substring ( 0 , 3 ) } , j : function ( ) { return dateObj . getDate ( ) } , l : function ( ) { return self . weekdays [ format . w ( ) ] + 'day' } , S : function ( ) { return self . suffix [ format . j ( ) ] || 'th' } , w : function ( ) { return dateObj . getDay ( ) } , F : function ( ) { return self . _convertMonthIdx ( format . n ( ) , true ) } , m : function ( ) { var month = format . n ( ) + 1 return ( month < 10 ) ? '0' + month : month } , M : function ( ) { return self . _convertMonthIdx ( format . n ( ) , false ) } , n : function ( ) { return dateObj . getMonth ( ) } , Y : function ( ) { return dateObj . getFullYear ( ) } , y : function ( ) { return format . Y ( ) . substring ( 2 , 4 ) } } , formatPieces = this . dateFormat . split ( '' ) for ( i = 0 , x = formatPieces . length ; i < x ; i ++ ) { formattedDate += format [ formatPieces [ i ] ] ? format [ formatPieces [ i ] ] ( ) : formatPieces [ i ] } return formattedDate }
Formats a date
Formats a date