0.3.1 • Published 9 years ago

dustjs-helper-formatdate-legacy v0.3.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

Date formatting helper for Dust.js

This fork is compatible with dustjs-helper-formatdate v0.1.0 while providing the saner interface introduced in 0.2.

It also adds a few tests.

For Node.js

var dust = require('dustjs-linkedin');
require('dustjs-helpers');
require('dustjs-helper-formatdate');

For the browser

<script src="/js/dust.js"></script>
<script src="/js/moment.js"></script>
<script src="/js/dustjs-helper-formatdate.js"></script>

Use in Dust template

<time>
    {@formatDate date="{myDate}" format="YYYY. MMMM Do HH:mm" lan="en-US"/}
</time>

or with Dust keys:

<time>
    {@formatDate date="{myDate}" format="{formatString}" lan="{locale}"/}
</time>

License

MIT license