{{- if .ExpiryDate -}} {{- $expired := and .ExpiryDate (ge now.Unix .ExpiryDate.Unix) -}} {{- $diff := now.Sub .ExpiryDate -}} {{- $duration := lang.FormatNumberCustom 0 (math.Round (mul (div $diff.Hours 24) -1)) -}} {{- $date := .ExpiryDate | time.Format "Monday, January 2 2006 at 15:04:05 MST" -}} {{- $title := print "Self destructs within" " " $duration " " "days" " " "(" $date ")" -}} {{- if $expired -}} {{- $title = print "Self destructed" " " $date -}} {{- end -}} {{- safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/trash-2.svg")) -}} {{- /* This comment removes trailing newlines and white spaces. */ -}} {{- end -}}