Difference between revisions of "Template:Event infobox"

no edit summary
Line 1: Line 1:
<includeonly>{{#if: {{NAMESPACE}} | <!-- don't create subobj within namespace --> |
<includeonly>{{#if: {{NAMESPACE}} | <!-- don't create subobj within namespace --> |
{{#vardefine:is active|{{#ifeq:{{{active|}}}|true|true|{{#ifeq:{{{active|}}}|false|false|}}}}
{{#vardefine:is active|{{#ifeq:{{{active|true}}}|true|true|{{#ifeq:{{{active|true}}}|false|false|}}}}
}}{{#if:{{{duration|}}}|
}}{{#if:{{{duration|}}}|
   {{#vardefine:duration array|{{{duration|}}}
   {{#vardefine:duration array|{{{duration|}}}
Line 34: Line 34:
     |{{#vardefine:duration|{{#var:duration array piece name}}!{{#replace:{{#time:c|{{#var:duration array piece start}}}}|+00:00|+09:00}}->{{#replace:{{#time:c|{{#var:duration array piece end}}}}|+00:00|+09:00}}}}
     |{{#vardefine:duration|{{#var:duration array piece name}}!{{#replace:{{#time:c|{{#var:duration array piece start}}}}|+00:00|+09:00}}->{{#replace:{{#time:c|{{#var:duration array piece end}}}}|+00:00|+09:00}}}}
   }}{{#ifexpr:{{#time: U|now}} >= {{#time:U|{{#var:duration array piece start}}}} and {{#time: U|now}} <= {{#time: U|{{#var:duration array piece end}}}}|
   }}{{#ifexpr:{{#time: U|now}} >= {{#time:U|{{#var:duration array piece start}}}} and {{#time: U|now}} <= {{#time: U|{{#var:duration array piece end}}}}|
     {{#vardefine:is active|true}}
     <!--{{#vardefine:is active|true}}-->
   }}{{#vardefine:duration array piece start|{{#time:U|{{#var:duration array piece start}}}}
   }}{{#vardefine:duration array piece start|{{#time:U|{{#var:duration array piece start}}}}
   }}{{#vardefine:duration array piece end|{{#time:U|{{#var:duration array piece end}}}}
   }}{{#vardefine:duration array piece end|{{#time:U|{{#var:duration array piece end}}}}