diff --git a/content/templates/functions.md b/content/templates/functions.md index 89c866951..d84d8ad39 100644 --- a/content/templates/functions.md +++ b/content/templates/functions.md @@ -391,6 +391,11 @@ Replace all occurences of the search string with the replacement string. e.g. `{{ replace "Batman and Robin" "Robin" "Catwoman" }}` → "Batman and Catwoman" +### dateFormat +Converts the textual representation of the datetime into the other form or returns it of Go `time.Time` type value. These are formatted with the layout string. + +e.g. `{{ dateFormat "Monday, Jan 2, 2006" "2015-01-21" }}` →"Wednesday, Jan 21, 2015" + ### highlight Take a string of code and a language, uses Pygments to return the syntax highlighted code in HTML. Used in the [highlight shortcode](/extras/highlighting).