https://bugzilla.wikimedia.org/show_bug.cgi?id=7114





--- Comment #14 from Happy-melon <[email protected]>  2009-04-22 20:25:36 
UTC ---
With the #time and #expr parser functions we can trivially calculate the number
of seconds between two dates:

{{#expr: {{#time:U|date1}} - {{#time:U|date2}} }}

If we had a function #timeformat to match #dateformat, that converted that
string into a relative time, then you have your prettified output; as noted in
comment7, it would be nice to be able to get only a part of the output.  But
such a function could also be used to, for instance, convert between units of
time (eg {{#timeformat: numberofseconds | Y }} converts seconds to years).  Of
course this can be done using #expr but guess what, so can #timeformat itself. 
If you're determined to ignore the fact that this can be quite easily handled
on-wiki without any extra bells-and-whistles from the software end, the
resulting function might as well be as useful as possible.

You're right, I guess, that this bug isn't really FIXED because the available
solution is not software-based, but I'd strongly suggest WONTFIX for exactly
that reason.  It's easily doable on-wiki, without bloating the code with
another myserious parser function, and without running into performance issues. 


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- 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
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to