nunjucks-date
Plugin for nunjucks of momentjs' format date
Installation
npm install nunjucks-date --save
Usage
var nunjucksDate = require("nunjucks-date");
nunjucksDate.setDefaultFormat("MMMM Do YYYY, h:mm:ss a");
var env = new nunjucks.Environment();
Using default name : 'date'
nunjucksDate.install(env);
Using custom name
nunjucksDate.install(env, "yourFilterName");
The above is eqivalent to
env.addFilter("date", require("nunjucks-date"));
Tests
- Uses
jest
to run tests to generate code coverage metrics.
npm test
open coverage/lcov-report/index.html
Contributing
Contributions are welcome. Please file issues with any problems that you experience. Pull requests are welcome.