summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--in.html2
-rw-r--r--openring.go3
2 files changed, 4 insertions, 1 deletions
diff --git a/in.html b/in.html
index d1437e8..a9f63e6 100644
--- a/in.html
+++ b/in.html
@@ -10,7 +10,7 @@
<small class="source">
via <a href="{{.SourceLink}}">{{.SourceTitle}}</a>
</small>
- <small class="date">{{.Date | date}}</small>
+ <small class="date">{{.Date | datef "January 2, 2006"}}</small>
</div>
{{end}}
</section>
diff --git a/openring.go b/openring.go
index cbaba1f..4f74631 100644
--- a/openring.go
+++ b/openring.go
@@ -76,6 +76,9 @@ func main() {
"date": func(t time.Time) string {
return t.Format("January 2, 2006")
},
+ "datef": func(fmt string, t time.Time) string {
+ return t.Format(fmt)
+ },
}).
Parse(string(input))
if err != nil {