var MyDate = function (argument) {
	if (typeof argument === 'undefined') {
		this.date = new Date();
		return;
	}
	this.date = new Date(argument);
};

MyDate.prototype.format = function(formatString) {
	formatString = this.replaceYear(formatString);
	formatString = this.replaceMonth(formatString);

	return formatString;
};

MyDate.prototype.replaceYear = function(formatString) {
	var year = this.date.getFullYear();
	return formatString.replace(/%Y/gi, year);
};

MyDate.prototype.replaceMonth = function(formatString) {
	var month = this.date.getMonth() + 1;
	if (month < 10) {
		month = '0' + month;
	}
	return formatString.replace(/%m/gi, month);
};

@@ -291,16 +291,64 @@
 String);
+%0A%09formatString = this.replaceDate(formatString);
 %0A%0A%09retur
@@ -693,12 +693,191 @@
  month);%0A%7D;%0A
+%0AMyDate.prototype.replaceDate = function(formatString) %7B%0A%09var date = this.date.getDate();%0A%09if (date %3C 10) %7B%0A%09%09date = '0' + date;%0A%09%7D%0A%09return formatString.replace(/%25d/gi, date);%0A%7D;%0A

Add method of replaceDate