Difference between revisions of "Template:FestivalDates"
Line 1: | Line 1: | ||
FIXMEEEEE | FIXMEEEEE | ||
− | {{{dates = {{#str:replace|{{{1|23.3.2015, 24.3.2014 - 27. | + | {{{dates = {{#str:replace|{{{1|23.3.2015, 24.3.2014 - 27.5. 2014}}}|\s|}}}}} |
− | |||
{{#arr:loop | {{#arr:loop | ||
− | | i= | + | | i=chunk |
| {{#arr:split|{{{dates}}}|,+}} | | {{#arr:split|{{{dates}}}|,+}} | ||
− | | each = | + | | each = {{{ |
− | + | dates = {{#arr:split|{{{chunk}}}|[-–]}} | |
− | {{{ | ||
− | dates = {{#arr:split|{{{ | ||
| start_date = {{#arr:get|{{{dates}}}|0}} | | start_date = {{#arr:get|{{{dates}}}|0}} | ||
| end_date = {{#arr:get|{{{dates}}}|1|{{{start_date}}}}} | | end_date = {{#arr:get|{{{dates}}}|1|{{{start_date}}}}} | ||
− | | start_week = {{#timel:W|{{{start_date}}}}} | + | | start_year = {{#timel:Y|{{{start_date}}}}} |
− | | end_week = {{#timel:W|{{{end_date}}}} | + | | end_year = {{#timel:Y|{{{end_date}}}}} |
− | }}} | + | | start_week = {{#expr:100*{{{start_year}}}+{{#timel:W|{{{start_date}}}}}}} |
− | + | | end_week = {{#expr:100*{{{end_year}}}+{{#timel:W|{{{end_date}}}}}}} | |
− | {{#arr: | + | | weeks = {{#arr:series|{{{start_week}}}|{{{end_week}}}}} |
− | + | }}}{{#arr:loop | |
− | {{{ | + | | j = week |
− | + | |{{{weeks}}} | |
− | + | | each = {{#set:Festival weeks={{{week}}}}} | |
− | }} | + | }}}} |
Revision as of 19:07, 3 June 2015
FIXMEEEEE