moment-random
v2.0.0
Published
Generates a random momentjs object
Maintainers
Readme
moment-random
Generates a new random moment.js object
Install
make sure you have moment installed
$ npm install moment-randomUsage
import momentRandom from 'moment-random'
// or: const momentRandom = require('moment-random')
momentRandom()
// > random date in the pastYou can also specify an interval
momentRandom(end)
// > random date between 0 unix time and {end} dates
momentRandom(end, start)
// > random date between {start} and {end} datesArguments
end, start- anything a moment constructor accepts (see moment.js docs)
