Difference between revisions of "Template:FestivalDates"

From Culture.si
 
(11 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
| {{#arr:split|{{{dates}}}|,+}}
 
| {{#arr:split|{{{dates}}}|,+}}
 
| each = {{{
 
| each = {{{
   dates = {{#arr:split|{{{chunk}}}|[-−–]}}
+
   dates = {{#arr:split|{{{chunk}}}|[-‐‑‒–—―]}}
 
| start_date = {{#arr:get|{{{dates}}}|0}}
 
| start_date = {{#arr:get|{{{dates}}}|0}}
| startd = {{#timel:Ymd|{{{start_date}}}}}
+
| start = {{#timel:Ymd|{{{start_date}}}}}
 
| end_date = {{#arr:get|{{{dates}}}|1|{{{start_date}}}}}
 
| end_date = {{#arr:get|{{{dates}}}|1|{{{start_date}}}}}
| endd = {{#timel:Ymd|{{{end_date}}}}}
+
| end = {{#timel:Ymd|{{{end_date}}}}}
 
| start_year = {{#timel:Y|{{{start_date}}}}}
 
| start_year = {{#timel:Y|{{{start_date}}}}}
 
| end_year = {{#timel:Y|{{{end_date}}}}}
 
| end_year = {{#timel:Y|{{{end_date}}}}}
Line 14: Line 14:
 
| end_week = {{#expr:100*{{{end_year}}}+{{#timel:W|{{{end_date}}}}}}}
 
| end_week = {{#expr:100*{{{end_year}}}+{{#timel:W|{{{end_date}}}}}}}
 
| weeks = {{#arr:series|{{{start_week}}}|{{{end_week}}}}}
 
| weeks = {{#arr:series|{{{start_week}}}|{{{end_week}}}}}
}}}{{#arr:loop
+
}}}
 +
{{#arr:loop
 
| j = week
 
| j = week
 
|{{{weeks}}}
 
|{{{weeks}}}
 
| each = {{#set:Festival weeks={{{week}}}}}
 
| each = {{#set:Festival weeks={{{week}}}}}
 
}}
 
}}
| last = {{#set:Festival start={{{startd}}}}}{{#set:Festival end={{{endd}}}}}
+
| last = {{#set:Festival start={{{start}}}}}{{#set:Festival end={{{end}}}}}
 
}}
 
}}

Latest revision as of 23:06, 21 January 2020