On Mittwoch, 4. März 2009, Patrick Nagel wrote: > Hi, > > since I need our SMW to output ISO8601 date output (see [1]) I wrote a > quick patch to SMW_DV_Time.php that honours the (newly introduced) > $smwgISO8601DateOutput variable. > > Could something like this be included in SMW?
Yes. I suggest a slightly different control interface, though. The output is only a problem for #ask queries, right? My suggestion is to use the existing "printout modifier" mechanism that works for #ask printouts, so that one can choose for each single printout which format to use. Example: {{#ask: ... | ?start date | ?end date#ISO }} This will show a three column table with start date in localized format and end date in ISO 8601 format. The ISO date is always completed (assuming January and 01 as defaults for month and day as in sorting). The time component may be omitted. If given, the time is separated by "T" as defined in the spec. Years are padded up to four digits, so you get things like "0010-05-06". Negative years, as suggested by ISO, represent BC dates, with 0 corresponding to 1 BC, -1 corresponding to 2 BC, and so on. All implemented in SVN. Have fun, Markus P.S. I am very busy right now: it will take me some time to process other contributions. Please be patient, and possibly send a reminder if I should miss any contribution. Filing a bug/feature request + patch is of course the best thing to ensure things are not forgotten. > > Patrick. > > [1]: > http://sourceforge.net/mailarchive/forum.php?thread_name=49A223B5.1090608%4 >0patrick-nagel.net&forum_name=semediawiki-user -- Markus Krötzsch Semantic MediaWiki http://semantic-mediawiki.org http://korrekt.org mar...@semantic-mediawiki.org
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H
_______________________________________________ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel