Skip to content

Instantly share code, notes, and snippets.

@artembeloglazov
Created November 11, 2015 10:22
Show Gist options
  • Save artembeloglazov/07efcf901f6ef03081bb to your computer and use it in GitHub Desktop.
Save artembeloglazov/07efcf901f6ef03081bb to your computer and use it in GitHub Desktop.
Феерический цикл дат на moment.js
var moment = require('moment');
var a = moment('2013-01-01');
var b = moment('2013-06-01');
for (var m = a; m.isBefore(b); m.add('days', 1)) {
console.log(m.format('YYYY-MM-DD'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment