Update date_format.js

This commit is contained in:
wood1986 2013-08-13 23:04:52 +08:00
parent 21aebbde33
commit 2d177d517b

View File

@ -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());