test_dayofweek.js 442 B

123456789101112131415
  1. var assert = require('assert');
  2. var dateFormat = require('./../lib/dateformat');
  3. describe('dayOfWeek', function() {
  4. it('should correctly format the timezone part', function(done) {
  5. var start = 10; // the 10 of March 2013 is a Sunday
  6. for(var dow = 1; dow <= 7; dow++){
  7. var date = new Date('2013-03-' + (start + dow));
  8. var N = dateFormat(date, 'N');
  9. assert.strictEqual(N, String(dow));
  10. }
  11. done();
  12. });
  13. });