Page MenuHomePhabricator

you can no longer specify date format using the "units" technique
Closed, DeclinedPublic

Description

Author: info

Description:
SMW 0.7 let you specify a "unit" for dates either by adding something like [[primary display unit=%Y]] to an attribute page or in a query like [[Date of birth:=+]][[Date of birth:=%b %m]]. (The first results in seeing 2007 for a date, the second results in Nov 02.)

This overloading of the unit specifier is broken in 1.0 The new SMW_DV_Time.php simply ignores date formats. The 0.7 SMW_DT_DateTime.php, if passed desired units, would use strftime($wantedFormat, $time) to format the date.

This is a significant regression. However, I don't know how many installations use this feature. It lets you control the precision of a date, and it lets you do things like show a birthday a certain way.

MediaWiki has its own way to format dates but you could still support the UNIX-y approach by looking for a % in the unit string.


Version: unspecified
Severity: minor
URL: http://sandbox.semantic-mediawiki.org/wiki/Date_type_demo#Tinkering_with_format

Details

Reference
bz11853

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:58 PM
bzimport set Reference to bz11853.

Since we plan to change the date processing code into something that supports the whole history of the universe also without 64bit support, we need to get away from PHP's (and thus, alas, also MediaWiki's) datetime processing/formatting.

The feature is cool and useful, so something simliar should be added in the future again. But maybe something less technical would be good (e.g. using a small set of predefined formatting constants that could be internationalised).

And, as you said, we may not need to be concerned about too many people using this. If they still pop up, they can contribute requirements to the new implementation ;-)

[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.