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

       Web browser: ---
            Bug ID: 44818
           Summary: jquery.tablesorter should sort plain year digits as
                    date
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: Unprioritized
         Component: JavaScript
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---

In some rows of sortable tables stay not the full qualified date, but only the
year is known. The enhanchment is, that this is detected by tablesorter.
Example:
{| class="wikitable sortable"
! data-sort-type="date" |"Date" 
|-
| 1. 1. 2000
|-
| 2011
|-
| about 1900
|-
| 2010<ref>cite</ref>
|}
Today (2013-01-25) only the first row is a 'date'. To prevent mistake in auto
detecting parser this should work only if data-sort-type="date" is spezified.

Sugestion: add folow code at row 926 in jquery.tablesorter.js:
} else if ( ( match = s.match( new RegExp( /(\d{2,4})/) ) ) !== null ) { //
only year
    s = [ match[1], '99', '99' ];

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to