18 lines
336 B
HTML
18 lines
336 B
HTML
|
<!--
|
||
|
Renders a role's start date.
|
||
|
|
||
|
@params . Role start date.
|
||
|
@return Date
|
||
|
-->
|
||
|
|
||
|
<!-- Validation -->
|
||
|
|
||
|
{{- if ( not ( eq (printf "%T" . ) "time.Time" ) ) -}}
|
||
|
{{- errorf "Start date is not a `time.Time`, it's a %T" . -}}
|
||
|
{{- end -}}
|
||
|
|
||
|
|
||
|
<!-- Rendering -->
|
||
|
|
||
|
{{- return ( printf "new Date('%s')" ( .Format "2006-01-02" ) ) -}}
|