{{ $date:= .Get "date" }} {{ if not $date }} {{ errorf "Error: 'date' is a required parameter." }} {{ end }} {{ $date := time.AsTime $date }} {{ $month := $date.Month | int }} {{ $year := $date.Year }} {{ $t1 := printf "%4d-%02d-01" $year $month }} {{ $t1 := time.AsTime $t1 }} {{ $t2 := $t1.AddDate 0 1 0 }} {{ $daysInMonth := $t2.Sub $t1 }} {{ $daysInMonth := $daysInMonth.Hours }} {{ $daysInMonth := div $daysInMonth 24 }}
{{ i18n (printf "days.%s" .) }}
{{ end }}