This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{- $PostYear := .Date -}} | |
| {{- $CurrentYear := time.Now -}} | |
| {{- $YearDifU := math.Sub $CurrentYear.Unix $PostYear.Unix -}} | |
| {{- $TPostYear := .Date | time.Format "2006" | int -}} | |
| {{- $YearDif := math.Sub (now.Year | int) $TPostYear -}} | |
| {{- if ge $YearDifU 31536000 -}} | |
| <p class="notice"> | |
| This post is over {{ if eq $YearDif 1 }} a year{{- else -}}{{- $YearDif }} years{{- end }} old. The information here may be out of date, and may not reflect my current thoughts or opinions. | |
| </p> | |
| {{- end -}} |