javascript - How to use faker.date.between faker.js -
i want generate dates between 2 fixed values, don't know how to
use faker.date.between
achieve that.
the example in faker js demo giving null
value.
their code github shows:
self.between = function (from, to) { var frommilli = date.parse(from); var dateoffset = faker.random.number(date.parse(to) - frommilli); var newdate = new date(frommilli + dateoffset); return newdate; };
and don't know how you're using it, or why it's not working on example.... should give direction, @ least.
if not you, or still producing undesired result, open issue on github.
Comments
Post a Comment