22 lines
381 B
HTML
22 lines
381 B
HTML
|
<!--
|
||
|
Renders a role's end date, or today if none is set.
|
||
|
|
||
|
@params . Role start date. Can be undefined.
|
||
|
@return Date
|
||
|
-->
|
||
|
|
||
|
<!-- Variable Initialisation -->
|
||
|
|
||
|
{{- $end_date := "" -}}
|
||
|
|
||
|
|
||
|
<!-- Rendering -->
|
||
|
|
||
|
{{- if . -}}
|
||
|
{{- $end_date = . -}}
|
||
|
{{- else -}}
|
||
|
{{- $end_date = ( now.Format "2006-01-02" ) -}}
|
||
|
{{- end -}}
|
||
|
|
||
|
{{- return ( printf "new Date('%s')" $end_date ) -}}
|