Last modified: 2011-04-15 08:49:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 20418 - Allow to add new regex to wikibits ts_resortTable (sortable table)
Allow to add new regex to wikibits ts_resortTable (sortable table)
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Low normal with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2009-08-27 12:28 UTC by Platonides
Modified: 2011-04-15 08:49 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Platonides 2009-08-27 12:28:07 UTC
The way to sort existing formats like dats can be customized by overriding the function with a locale aware one (see bug 15408). However, it doesn't allow to use other formats, like full months. There should be a way to provide new regex to call sortable functions (bug 8226 also wants to increase the recognised date formats, but doesn't allow local customization).
Comment 1 DieBuche 2011-01-08 15:19:06 UTC
fixed in patch for Bug 8028
Comment 2 DieBuche 2011-04-15 08:49:22 UTC

Use it like
tablesorter.addParser( {
		id: "time",
		is: function (s) {
			return ts.rgx.time[0].test(s);
		format: function (s) {
			return $.tablesorter.formatFloat( new Date( "2000/01/01 " + s ).getTime() );
		type: "numeric"
	} );

Note You need to log in before you can comment on or make changes to this bug.