nunjucks-date
Plugin for nunjucks of momentjs' format date
Installation
npm install nunjucks-date --save
Usage
// Import the pluginvar nunjucksDate = ; // Define a custom default date format. Any valid format works.// The date format defaults to "YYYY"// http://momentjs.com/docs/#/displaying/format/nunjucksDate; // Initialize your Nunjucks enironmentvar env = ;
Using default name : 'date'
// Pass the environment to `install()`nunjucksDate;
Using custom name
// Pass the environment & a custom filter namenunjucksDate;
The above is eqivalent to
env;
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.