Difference between revisions of "Template:WhereEvent"

From Culture.si
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
TRUE {{#if:{{{before|}}}| and Event.Start <= '{{#timel:c|{{{before}}}}}'}} {{#if:{{{after|}}}| and coalesce(Event.End,Event.Start) >= '{{#timel:c|{{{after}}}}}'}} {{#switch:{{{year|}}}||all=
+
Event.Years.Year IS NOT NULL {{#if:{{{before|}}}| and Event.Start <= '{{#timel:c|{{{before}}}}}'
|#default = and (date_part('year',Event.Start)='{{#cast:integer|{{{year}}}}}' or date_part('year',Event.End)='{{#cast:integer|{{{year}}}}}')}} {{#switch:{{{category|}}}|=|all=|#default = and Event.Tag = '{{#str:addslashes|{{#title:pagenamek|{{{category}}}}}}}'
+
}} {{#if:{{{after|}}}| and Event.Start >= '{{#timel:c|{{{after}}}}}'
}} {{#switch:{{{country|}}}|=|all=|international= and Event.Country != 'Slovenia'|#default = and Event.Country = '{{#str:addslashes|{{#title:pagenamek|{{{country}}}}}}}'
+
}} {{#switch:{{{year|}}}
 +
| current = and Event.Start <='{{#timel:c|yesterday}}' and Event.End>='{{#timel:c|today}}'
 +
| upcoming = and Event.Start >= '{{#timel:c|yesterday}}'
 +
| #default = and coalesce(Event.End,Event.Start) <= '{{#timel:c|today}}'
 +
}} {{#switch:{{{year|}}}
 +
| =
 +
| all=
 +
| upcoming =
 +
| current =
 +
| #default = and (Event.Years='Year_{{#cast:integer|{{{year}}}}}')
 +
}} {{#switch:{{{category|}}}
 +
|=
 +
|all=
 +
|#default = and Event.Tag = '{{#str:addslashes|{{#title:pagenamek|{{{category}}}}}}}'
 +
}} {{#switch:{{{country|}}}
 +
|all=
 +
|= and Event.Country != 'Slovenia'
 +
|international= and Event.Country != 'Slovenia'
 +
|#default = and Event.Country = '{{#str:addslashes|{{#title:pagenamek|{{{country}}}}}}}'
 
}}
 
}}

Latest revision as of 17:49, 27 September 2023

Event.Years.Year IS NOT NULL and coalesce(Event.End,Event.Start) <= '2024-11-22T01:00:00+01:00' and Event.Country != 'Slovenia'