Skip to content

Instantly share code, notes, and snippets.

Last active Oct 13, 2015
What would you like to do?
DocPad: Localising Dates
# Requires
moment = require('moment').lang('fr') # set locale to french
# Define Configuration
docpadConfig =
# Format the passed date, by default format like: Thursday, November 29 2012 3:53 PM
formatDate: (date,format='LLLL') -> return moment(date).format(format)
# Export Configuration
module.exports = docpadConfig
This document was last modified at: <%= @formatDate( %>
Copy link

zenorocha commented Nov 29, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment