File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1419,6 +1419,7 @@ $.extend( Datepicker.prototype, {
14191419 dayNames = ( settings ? settings . dayNames : null ) || this . _defaults . dayNames ,
14201420 monthNamesShort = ( settings ? settings . monthNamesShort : null ) || this . _defaults . monthNamesShort ,
14211421 monthNames = ( settings ? settings . monthNames : null ) || this . _defaults . monthNames ,
1422+ year ,
14221423
14231424 // Check whether a format character is doubled
14241425 lookAhead = function ( match ) {
@@ -1474,8 +1475,10 @@ $.extend( Datepicker.prototype, {
14741475 output += formatName ( "M" , date . getMonth ( ) , monthNamesShort , monthNames ) ;
14751476 break ;
14761477 case "y" :
1477- output += ( lookAhead ( "y" ) ? date . getFullYear ( ) :
1478- ( date . getFullYear ( ) % 100 < 10 ? "0" : "" ) + date . getFullYear ( ) % 100 ) ;
1478+ year = date . getFullYear ( ) ;
1479+ output += ( lookAhead ( "y" ) ?
1480+ ( year >= 0 && year < 1000 ? ( year < 10 ? "000" : year < 100 ? "00" : "0" ) : "" ) + year :
1481+ ( year % 100 < 10 ? "0" : "" ) + year % 100 ) ;
14791482 break ;
14801483 case "@" :
14811484 output += date . getTime ( ) ;
You can’t perform that action at this time.
0 commit comments