> Plain numbers are interpreted as years. There could be another syntax for > what > you want here, though. Should not be a major problem, if we have a syntax > proposal. > > Well, it's just a number, stored in database. Maybe percent sign as prefix? [[Date::>%internal_date_number_in_seconds]] [[Date::<%internal_date_number_in_seconds]] where internal_date_number_in_seconds can be double precision float as in Historical Date format, or 64bit int. Anyway, it's just a number, I just hope it will be possible to {{#eval}} to add or subtract any number of seconds. But, there should be a parser function or templates, which converts usual representation of year, month, day, hour, min, sec to and from that numerical representation. > That is already in place: SMW will accept English data formats in any > language > (this is a requirement for upgrading existing wikis anyway). > > Ok.
>> Also, localized formats aren't fixed, here in Russia the same date can be >> displayed either as >> 13 Oktyabrya 2008 >> or >> 13.10.2008 >> so, it would be nice to be able to specify formatting in printouts, >> something like >> {{#ask:...|?Date{d.M.y}|...}} >> > > We have thought of enabling this later on. It might also be possible to > specify printout formats by example, to avoid complicated syntax. > > The { } is the first concrete syntax proposal for adding parameters to > printouts -- for output formatting, we can use #... already, but maybe {} > could work for other parameters. Would > > ?date{limit=3, format=ul} > > be nice? > > The sharp sign (#) would also be OK. I just don't understand what limit and format has with Date type. I think limit and format does belong to the query itself, not to particular Date printout. Obviousely, you should be able to use different formats in one query: {#ask:...| ?date1#|m.d.y|| ?date2#|D M j G:i:s T Y|| ...}} but is there any purpose to limit one printout to three rows, while another to 5? You're right, that closing curly brace is not required, because vertical line (|) is already a separator.. >> Dates are horrible thing - they use complex numerical base. I've had a >> pain of building >> a query which should return pages of memorable dates from past >> centuries, where only >> day and month should match with current one. >> > > Yes, that would be difficult. > > To make it much simplier, one probably would store integer values of y,m,d,h,m,s in separate fields corresponding to every numerical date. Then, such queries can be performed much simplier. I believe that memorable dates are important thing for many wikis: {{#ask:[[Date1::>{month=3,day=5,year=*}]]|...}} >> These templates helped me a lot: >> http://meta.wikimedia.org/wiki/Category:Date_computing_template >> many thanks to hard work of the people who had implemented these. >> >> By the way, these templates already ISO8601 compliant: >> http://meta.wikimedia.org/wiki/Template:YMD2MJD >> Maybe it would be nice to have compatibility with such templates. >> > > Thanks for the pointer. We will have a look. > > Hope it's useful. Dmitriy ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel