Index: trunk/phase3/maintenance/parserTests.txt |
— | — | @@ -7289,8 +7289,17 @@ |
7290 | 7290 | !! result |
7291 | 7291 | <p><a href="https://www.mediawiki.org/index.php?title=2009-03-24&action=edit&redlink=1" class="new" title="2009-03-24 (page does not exist)">2009-03-24</a> |
7292 | 7292 | </p> |
7293 | | -!!end |
| 7293 | +!! end |
7294 | 7294 | |
| 7295 | +!! test |
| 7296 | +Spacing of numbers in formatted dates |
| 7297 | +!! input |
| 7298 | +{{#formatdate:January 15}} |
| 7299 | +!! result |
| 7300 | +<p><span class="mw-formatted-date" title="01-15">January 15</span> |
| 7301 | +</p> |
| 7302 | +!! end |
| 7303 | + |
7295 | 7304 | # |
7296 | 7305 | # |
7297 | 7306 | # |
Index: trunk/phase3/includes/parser/DateFormatter.php |
— | — | @@ -48,10 +48,10 @@ |
49 | 49 | $this->prxISO2 = '\[\[(-?\d{4})-(\d{2})-(\d{2})\]\]'; |
50 | 50 | |
51 | 51 | # Real regular expressions |
52 | | - $this->regexes[self::DMY] = "/{$this->prxDM} *,? *{$this->prxY}{$this->regexTrail}"; |
53 | | - $this->regexes[self::YDM] = "/{$this->prxY} *,? *{$this->prxDM}{$this->regexTrail}"; |
54 | | - $this->regexes[self::MDY] = "/{$this->prxMD} *,? *{$this->prxY}{$this->regexTrail}"; |
55 | | - $this->regexes[self::YMD] = "/{$this->prxY} *,? *{$this->prxMD}{$this->regexTrail}"; |
| 52 | + $this->regexes[self::DMY] = "/{$this->prxDM}( *, *| +){$this->prxY}{$this->regexTrail}"; |
| 53 | + $this->regexes[self::YDM] = "/{$this->prxY}( *, *| +){$this->prxDM}{$this->regexTrail}"; |
| 54 | + $this->regexes[self::MDY] = "/{$this->prxMD}( *, *| +){$this->prxY}{$this->regexTrail}"; |
| 55 | + $this->regexes[self::YMD] = "/{$this->prxY}( *, *| +){$this->prxMD}{$this->regexTrail}"; |
56 | 56 | $this->regexes[self::DM] = "/{$this->prxDM}{$this->regexTrail}"; |
57 | 57 | $this->regexes[self::MD] = "/{$this->prxMD}{$this->regexTrail}"; |
58 | 58 | $this->regexes[self::ISO1] = "/{$this->prxISO1}{$this->regexTrail}"; |