You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ozgurkon-theme-hugo/layouts/partials/date-short.html

14 lines
332 B

{{ $monthFr := (slice "jan." "fév." "mar." "avr." "mai" "juin" "juil." "aoû." "sep." "oct." "nov." "déc.")}}
{{ $time := time (index . "time") }}
{{ $lang := index . "lang" }}
{{ $time.Day }}
{{ if eq $lang "fr" }}
{{ index $monthFr (sub $time.Month 1)}}
{{ else }}
{{ dateFormat "Jan." $time}}
{{ end }}
{{ $time.Year }}