aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/sections/projects.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/sections/projects.html')
-rw-r--r--layouts/partials/sections/projects.html17
1 files changed, 15 insertions, 2 deletions
diff --git a/layouts/partials/sections/projects.html b/layouts/partials/sections/projects.html
index fb0026c..75289ea 100644
--- a/layouts/partials/sections/projects.html
+++ b/layouts/partials/sections/projects.html
@@ -8,8 +8,21 @@
<em>{{ range $i, $e := .Params.tags -}}{{- if $i -}}, {{ end -}}{{ . }}{{- end -}}</em>
</td>
<td class="align-right">
- {{ with .Params.start_date }}{{ time.Format "Jan 2006" . }}{{ end }} –
- {{ with .Params.end_date }}{{ time.Format "Jan 2006" . }}{{ else }}{{ "Present" }}{{ end }}
+ {{ with .Params.start_date }}
+ {{ if le ( len (time.Format "January" .)) 4}}
+ {{ time.Format "January 2006" . }}
+ {{ else }}
+ {{ time.Format "Jan. 2006" . }}
+ {{ end }}
+ {{ end }} –
+ {{ with .Params.end_date }}
+ {{ if le ( len (time.Format "January" .)) 4}}
+ {{ time.Format "January 2006" . }}
+ {{ else }}
+ {{ time.Format "Jan. 2006" . }}
+ {{ end }}
+ {{ else }}{{ "Present" }}
+ {{ end }}
</td>
</tr>
</tbody>