Page MenuHomePhabricator

Change of Output for Type number an date
Closed, DeclinedPublic

Description

Author: dasch

Description:
I think it could be useful having the possibility to change the output for numbers and dates

for numbers it should be like ?Number#Mio. /Mrd. /Tsd. 4 example

for dates there could be something like ?Date#dd. MM yyyy and so on

I hope it's clear what's my intention


Version: unspecified
Severity: enhancement

Details

Reference
bz16601

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 10:24 PM
bzimport set Reference to bz16601.

dasch wrote:

when the classes for the standardtypes all had the same structure I could do it myself, but by now every type is handled in another way, the handling for the type date is not that important, but for Numbers would be very nice. Also because of the problem described in bug 13317. The thing is that the output now is very scientific, but most people cannot handle such numbers, so when having the possibility to print the population of countries in Millions would be very nice. By now populations of Milliards are displayed unreadable for normal people in normal installations.

I agree that it would be nice to improve our number formatting. In principle, there is just one not-so-complex function doing it right now:

smwfNumberFormat() found in SMW_GlobalFunctions.php

If you could extend this function to support the kind of behavior that you envision, then I can take care of updating the datatypes in a suitable way. I think you suggest this only for plain numbers (no units), right?

Internationalization would be a problem, since there is probably no common scheme on how/when to abbreviate large numbers.

As a workaround for the problem that you describe, I have shifted the default maximum size for numbers that are shown without using exp notation. At least all population numbers should now be displayed without exp. Since I will not be working on the other issue any time soon, I close this bug as "Later" -- as I said, your input would be welcome.

[Removing RESOLVED LATER as discussed in http://lists.wikimedia.org/pipermail/wikitech-l/2012-November/064240.html and announced in https://sourceforge.net/mailarchive/forum.php?thread_name=CALFVSbXkiffYy6HkhEWE0RtRrJ%2B2ebPz3g00gsr%2Bdz%2B1nZWsDA%40mail.gmail.com&forum_name=semediawiki-devel . Reopening and setting priority to "Lowest". For future reference, please use either RESOLVED WONTFIX (for issues that will not be fixed), or simply set lowest priority. Thanks a lot!]

Aklapper subscribed.

The Semantic MediaWiki developers requested in https://phabricator.wikimedia.org/T64114 to move their task tracking to https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues and to close remaining tasks in Wikimedia Phabricator. If you still face the problem reported in this task in a supported version of SMW, please feel free to transfer your report to https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues . We are sorry for the inconvenience.