r86664 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86663‎ | r86664 | r86665 >
Date:20:32, 21 April 2011
Author:neilk
Status:ok
Tags:
Comment:
fix off-by-one in month when defaulting to now
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js
@@ -455,7 +455,7 @@
456456 if ( !mw.isDefined( dateObj ) ) {
457457 dateObj = new Date();
458458 }
459 - dateStr = dateObj.getUTCFullYear() + '-' + pad( dateObj.getUTCMonth() ) + '-' + pad( dateObj.getUTCDate() );
 459+ dateStr = dateObj.getUTCFullYear() + '-' + pad( dateObj.getUTCMonth() + 1 ) + '-' + pad( dateObj.getUTCDate() );
460460
461461 // ok by now we should definitely have a dateObj and a date string
462462 $j( _this.dateInput ).val( dateStr );

Status & tagging log