@@ -59,7 +59,7 @@ Date.prototype.formatDate = function (input,time) {
5959
6060 d ( ) {
6161 // Day of the month, 2 digits with leading zeros
62- return new String ( self . getDate ( ) ) . length == 1 ?
62+ return String ( self . getDate ( ) ) . length == 1 ?
6363 "0" + self . getDate ( ) : self . getDate ( ) ;
6464 } ,
6565
@@ -86,25 +86,25 @@ Date.prototype.formatDate = function (input,time) {
8686 h ( ) {
8787 // 12-hour format of an hour with leading zeros
8888 if ( self . getHours ( ) > 12 ) {
89- var s = new String ( self . getHours ( ) - 12 ) ;
89+ var s = String ( self . getHours ( ) - 12 ) ;
9090 return s . length == 1 ?
9191 "0" + ( self . getHours ( ) - 12 ) : self . getHours ( ) - 12 ;
9292 } else {
93- var s = new String ( self . getHours ( ) ) ;
93+ var s = String ( self . getHours ( ) ) ;
9494 return s . length == 1 ?
9595 "0" + self . getHours ( ) : self . getHours ( ) ;
9696 }
9797 } ,
9898
9999 H ( ) {
100100 // 24-hour format of an hour with leading zeros
101- return new String ( self . getHours ( ) ) . length == 1 ?
101+ return String ( self . getHours ( ) ) . length == 1 ?
102102 "0" + self . getHours ( ) : self . getHours ( ) ;
103103 } ,
104104
105105 i ( ) {
106106 // Minutes with leading zeros
107- return new String ( self . getMinutes ( ) ) . length == 1 ?
107+ return String ( self . getMinutes ( ) ) . length == 1 ?
108108 "0" + self . getMinutes ( ) : self . getMinutes ( ) ;
109109 } ,
110110
@@ -176,7 +176,7 @@ Date.prototype.formatDate = function (input,time) {
176176
177177 s ( ) {
178178 // Seconds, with leading zeros
179- return new String ( self . getSeconds ( ) ) . length == 1 ?
179+ return String ( self . getSeconds ( ) ) . length == 1 ?
180180 "0" + self . getSeconds ( ) : self . getSeconds ( ) ;
181181 } ,
182182
0 commit comments