FANDOM


  • Hi, peeps

    I need a template for a simple day countdown, with no hours, minutes or seconds. Something as simple as:

    {{#ifexpr: ( {{#time: U | {{{day}}} {{{month}}} {{{year}}} }} - {{#time:U}} ) <= 0
    | no time
    | {{#expr: ( {{#time: U | {{{day}}} {{{month}}} {{{year}}} }} - {{#time:U}} ) / 86400 round 0}} days }}
    

    That I could use by specifying the limit date with a call like:

    {{Day countdown | day = ? | month = ? | year = ? }}
    

    The problem is that, once a page is saved with a time function (through a template or not) it depends on a purge action for the number of days to be updated.

    Is there a workaround for this without resorting to javascript?

    I don't like the idea of a script loading on all wiki pages when the template requiring the time function would be applied to 1% of the articles.

    Thanks in advance.

      Loading editor
    • cache supposed to be rebuilded daily. so your timer will not fall behind too far.

      if you do not want to use js, then it leaves like no options. there is no sane solutions. and there is sholdn't be one: it would destroy purpose of caching.

        Loading editor
    • Thanks. Good to know.

        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message
Community content is available under CC-BY-SA unless otherwise noted.