https://bugzilla.wikimedia.org/show_bug.cgi?id=7114
--- Comment #15 from Danny B. <[email protected]> 2009-04-26 21:51:49 UTC --- (In reply to comment #14) > 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. > Aha, so we're going to bloat the wikitext with way so complex template(s) to return the time diff in desired format instead? When I want the time difference, I want it in human legible format - "the difference is 1 year, 2 months, 3 days, 4 hours, 5 minutes and 6 seconds", not in a number of seconds or so. I also want to be able to format the result any possible way simply by adding the format string as a parameter of the function (such as {{#time:}} has now) without having to create and call either bunch of one-format-purpose templates or way so complex, very possibly nested, templates with dozens of {{#if:}}s and {{#switch:}}es and other stuff which actually would run into performance issues much earlier. Anyway, so far we don't have any #timeformat or any other function, right? So _after_ we'll have it, thus we'll be able to format the time differences easier than by dozens of {{#expr:}}s in dozens of (nested) templates, this request might be closed. We do not have any _simple_ way how to do what's requested. -- 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
