Date messed up when using #time within ask-template

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Date messed up when using #time within ask-template

InterSpirit
Within my ask query I use format = template.
Within the template I use the parser function #time to print my date in
a way that people understand better.

However the date gets messed up when using #time within the template.
You can see it on this page:
http://neu.distanzreiten.com/mediawiki/index.php/Test

Outside of the ask template #time works just fine - example:
http://neu.distanzreiten.com/mediawiki/index.php/4._Kabardinerhof-Distanz_Kreuzbruch

I'm using MW 1.26.2 and SMW 2.3.

Any help is highly appeciated.

Thanks,
Stefan



------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Date messed up when using #time within ask-template

InterSpirit
Thanks James,

I tried #time directly only with "28 September 2014" yesterday and this
went well - should have tested more.
Anyway, I posted the issue on the MediaWiki support desk now [0].

Regards,
Stefan

[0] https://www.mediawiki.org/wiki/Topic:Svu4xfa4exqim89y


-------- Original-Nachricht --------
Betreff: Re: [Semediawiki-user] Date messed up when using #time within
ask-template
Von: James HK <[hidden email]>
An: Stefan Seidner <[hidden email]>
Datum: 03.01.2016 20:46

> Hi,
>
> In future you might want to use [0] but to answer your question, this
> is unrelated to SMW because #ask result list includes 31 Dezember 2014
> and if include {{#time:d.m.Y|31 Dezember 2014}} in a normal page
> (without ask) you will see the same error message which indicates that
> this is related to #time and not SMW.
>
> {{#time:d.m.Y|28 September 2014}} works just fine.
>
> [0] http://sandbox.semantic-mediawiki.org/
>
> Cheers
>
> On 1/3/16, Stefan Seidner <[hidden email]> wrote:
>> Within my ask query I use format = template.
>> Within the template I use the parser function #time to print my date in
>> a way that people understand better.
>>
>> However the date gets messed up when using #time within the template.
>> You can see it on this page:
>> http://neu.distanzreiten.com/mediawiki/index.php/Test
>>
>> Outside of the ask template #time works just fine - example:
>> http://neu.distanzreiten.com/mediawiki/index.php/4._Kabardinerhof-Distanz_Kreuzbruch
>>
>> I'm using MW 1.26.2 and SMW 2.3.
>>
>> Any help is highly appeciated.
>>
>> Thanks,
>> Stefan
>>


------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Date messed up when using #time within ask-template

stefahn
In reply to this post by InterSpirit
I just figured out the solution.
It's just the way #time works - the function accepts only english month names, not german ones.

To fix this I used |?Date#ISO in my SMW ask query.

This way the date is not given out in German (21 Juni 2014), but as 2014-06-21 - which then can be put into #time without any issues :)