Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js |
— | — | @@ -469,8 +469,9 @@ |
470 | 470 | $j.each( [ 'datetimeoriginal', 'datetimedigitized', 'datetime', 'date' ], function( i, propName ) { |
471 | 471 | var dateInfo = metadata[propName]; |
472 | 472 | if ( ! mw.isEmpty( dateInfo ) ) { |
473 | | - var matches = $j.trim( dateInfo ).match( yyyyMmDdRegex ); |
474 | | - if ( ! mw.isEmpty( matches ) ) { |
| 473 | + var matches = $j.trim( dateInfo ).match( yyyyMmDdRegex ); |
| 474 | + // EXIF was founded in 1995, so anything before that is very unlikely |
| 475 | + if ( ! mw.isEmpty( matches ) && parseInt( matches[1], 10 ) > 1994) { |
475 | 476 | dateObj = new Date( parseInt( matches[1], 10 ), |
476 | 477 | parseInt( matches[2], 10 ) - 1, |
477 | 478 | parseInt( matches[3], 10 ) ); |