Détail du package

formatjs

nowamasa23.2k0.1.1

JavaScript date format tester.

validator, dates, testing, format

readme

formatjs

JavaScript date format tester.

Build Status

Getting Started

On the server

Install the module with: npm install formatjs

var formatjs = require('./formatjs');
formatjs.test('12/04', 'YYYY/MM');   // false
formatjs.test('2012/04', 'YYYY/MM'); // true

In the browser

Download the production version or the development version.

In your web page:

<script src="dist/formatjs.min.js"></script>
<script>
formatjs.test('12/04', 'YYYY/MM');   // false
formatjs.test('2012/04', 'YYYY/MM'); // true
</script>

In your web page using AMD loader:

<script>
require(['formatjs'], function(formatjs) {
    formatjs.test('12/04', 'YYYY/MM');   // false
    formatjs.test('2012/04', 'YYYY/MM'); // true
});
</script>

Contributing

Install nodejs.
Install coffee-script with: npm install -g coffee-script.
Install dependencies with: npm install.

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Test your code using grunt.

Also, please don't edit files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "src" subdirectory!

License

Copyright (c) 2012 nowamasa
Licensed under the MIT license.