{{ $months := seq 12 }} {{ $context := .context }} {{ $year := .year }} {{ $from := .from }} {{ $fromMonth := .fromMonth }} {{ $to := .to }} {{ $toMonth := .toMonth }} {{ $isLeapYear := (modBool (int $year) 4) }} {{ range $months }} {{ if or (and (ne $year $from) (ne $year $to)) (and (eq $year $from) (ge . $fromMonth)) (and (eq $year $to) (le . $toMonth)) }} {{ partialCached "calendar/month" (dict "context" $context "year" $year "isLeapYear" $isLeapYear "month" .) (string (delimit (slice $year .) "")) }} {{ end }} {{ end }}