Relative output needs relative input (#374)

pull/372/head^2
Michael McDonagh 4 months ago committed by GitHub
parent be1249d7a6
commit 7ba9df6526
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -238,6 +238,8 @@ func TestFormatDateHelper(t *testing.T) {
testString(t, "{{format-date now 'timestamp'}}", context, "200911172034")
testString(t, "{{format-date now 'timestamp-unix'}}", context, "1258490098")
testString(t, "{{format-date now 'cust: %Y-%m'}}", context, "cust: 2009-11")
year := time.Now().UTC().Year() - 14
context = map[string]interface{}{"now": time.Date(year, 11, 17, 20, 34, 58, 651387237, time.UTC)}
testString(t, "{{format-date now 'elapsed'}}", context, "14 years ago")
}

Loading…
Cancel
Save