Bug ID: 62564
           Summary: enhance Semantic Result Formats Math to calculate
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: Unprioritized
         Component: SemanticBundle
       Web browser: ---
   Mobile Platform: ---

I add to the SemanticResultFormats/formats/math/SRF_Math.php the lines and can
use this Result Formats to calculate dates, for querys like "get the last
president" if the president-pages has a date field "starting Job".

This resolution give the timestamp with decimalseparator, so i have to convert
the result.

My Example: 
Question: When was my last Review?
Solution: {{#time: Y-m-d|@{{#replace:{{#ask: [[HasReview::{{{1|}}}]]
?DateOfVisit |format=max}}|.|}}}}

Codechange ond SRF_Math.php:
110+ case SMWDataItem::TYPE_TIME:
111+   $numbers[] = $dataItem->getMwTimestamp();
112+   break;

Maybe there is a better solution than getMwTimestamp(), but i dont know the
available functions to return as "normal" date.

You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
Wikibugs-l mailing list

Reply via email to