dustjs-helper-formatdate-legacy

0.3.1 • Public • Published

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

Package Sidebar

Install

npm i dustjs-helper-formatdate-legacy

Weekly Downloads

0

Version

0.3.1

License

MIT

Last publish

Collaborators

  • framp