Difference between revisions of "Template:FestivalDates"

From Culture.si
Line 1: Line 1:
 
{{{dates = {{#str:replace|{{{1|}}}|\s|}}}}}
 
{{{dates = {{#str:replace|{{{1|}}}|\s|}}}}}
 +
Datumi: {{{dates}}}
 
{{#arr:loop
 
{{#arr:loop
 
| i=chunk
 
| i=chunk
 
| {{#arr:split|{{{dates}}}|,+}}
 
| {{#arr:split|{{{dates}}}|,+}}
| each = {{{
+
| each = {{{chunk}}}::::::{{{
   dates = {{#arr:split|{{{chunk}}}|[‐‑‒–—―]}}
+
   dates = {{#arr:split|{{{chunk}}}|[-‐‑‒–—―]}}
 
| start_date = {{#arr:get|{{{dates}}}|0}}
 
| start_date = {{#arr:get|{{{dates}}}|0}}
 
| start = {{#timel:Ymd|{{{start_date}}}}}
 
| start = {{#timel:Ymd|{{{start_date}}}}}
Line 14: Line 15:
 
| 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}}}

Revision as of 22:54, 21 January 2020

Datumi: