Page MenuHomePhabricator

Type:date should support ISO output format
Closed, ResolvedPublic

Description

Author: dasch

Description:
The Dateoutput that is now given from #ask when querying for a date is not readable by the Parserfunction #time
#time is using the PHP strtotime() function, so the problem is the output of SMW


Version: unspecified
Severity: enhancement

Details

Reference
bz17075

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 10:28 PM
bzimport set Reference to bz17075.

dasch wrote:

I made a temporary patch to get parsable dates

I made a temporary patch to get parsable dates

Attached:

I change the contents of this feature request as follows: Type:Date should have an option to select an output format in inline queries (and #show) that conforms to the ISO date specification.

The original request, that ''all'' Type:date outputs should be understood by #time is (at best) a bug for #time. It cannot be the goal of SMW to constrict its date support to the limitations of #time. SMW's dates now cover a far larger range (outside of Unix time) and support international date formatting. So it won't be possible, in general, to have #time support all dates that are available in SMW, due to the limitations of strtotime(). It would still be good to have an option to get ISO conformant output.

Changing this bug into a (high priority) feature request.

dasch wrote:

well by the way the SVN Version of the parserfunctions can also handle a wide timerange, the only problem at the moment is that the output of dates is not parsable

this problem was fixed some time ago, using the output format "ISO" as below:

{{#ask: ...

?dateproperty#ISO

}}