https://bugzilla.wikimedia.org/show_bug.cgi?id=4582





--- Comment #283 from Andrew Garrett <[email protected]>  2009-04-11 
15:20:55 UTC ---
(In reply to comment #282)
> This wikitext:
> 
> {{#formatdate:January 15}}
> 
> Produces this page text:
> 
> January 1, 5
> 
> Surely that's not correct.


Quoted from my talk page, on this matter:

If you're interested in fixing the problem with yearless dates, it's an
interesting one. When you strip out the [[ ]] syntax, you end up leaving " *,?
*" as the only thing separating the day from the year, and since that regex
matches the empty string, the parser function thinks the first digit of a
two-digit day is the day, and the second digit is the year (or the other way
around, depending on what the "raw" format is.) Fixing it is non-trivial
because while the simple and obvious fix is to use " *,? +" (or " *,? *" for
the non-perl-compatible regex) that will introduce annoying edge cases where
the comma is misplaced (handled correctly by the standard autoformatting) or
where the year is on a new line in the wikitext. I'm not sure if those edge
cases are worth worrying about though. --UC_Bill (talk) 18:30, 10 March 2009
(UTC)

    Maybe "( ,)+" would be better.. except that will allow [[15
January]],,,,,,,,[[2009]] to be matched (which may or may not be a problem) and
would require some corresponding changes to the "keys" array in DateFormatter
to tell it to ignore the new match register. --UC_Bill (talk) 18:41, 10 March
2009 (UTC)


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to