From 2d177d517b77f87cedd165bdeb14500a26338152 Mon Sep 17 00:00:00 2001 From: wood1986 Date: Tue, 13 Aug 2013 23:04:52 +0800 Subject: [PATCH] Update date_format.js --- lib/date_format.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/date_format.js b/lib/date_format.js index bf36318..d75ce20 100644 --- a/lib/date_format.js +++ b/lib/date_format.js @@ -45,7 +45,7 @@ exports.asString = function(/*format,*/ date) { var vDay = addZero(date.getDate()); var vMonth = addZero(date.getMonth()+1); var vYearLong = addZero(date.getFullYear()); - var vYearShort = addZero(date.getFullYear().toString().substring(3,4)); + var vYearShort = addZero(date.getFullYear().toString().substring(2,4)); var vYear = (format.indexOf("yyyy") > -1 ? vYearLong : vYearShort); var vHour = addZero(date.getHours()); var vMinute = addZero(date.getMinutes());