[WikiEN-l] Date conditional switching templates

Sam Korn smoddy at gmail.com
Tue May 12 13:05:47 UTC 2009


On Tue, May 12, 2009 at 12:36 PM, Luna <lunasantin at gmail.com> wrote:
> I've whipped up a quick example at <
> http://en.wikipedia.org/wiki/User:Luna_Santin/Dateswitch>, currently:
>
>   - {{#ifexpr: {{#time:U| {{{date|{{{3|}}}}}} }} > {{#time:U}} |
>   {{{pre|{{{1|}}}}}} | {{{post|{{{2|}}}}}} }}
>
> Which would give us:
>
>   - {{dateswitch | text before date | text on or after date | date}}
>
> This might have some problems with page cache, and honestly I'm a bit
> dubious about its utility, but from a template standpoint it shouldn't be
> too hard.

Pages with date magic should have their caches invalidated after 24
hours, I think.

Sam

-- 
Sam
PGP public key: http://en.wikipedia.org/wiki/User:Sam_Korn/public_key



More information about the WikiEN-l mailing list