Skip to content

Datetime

This is a datetime module, it contains future, past, and near

Future

dunna.datetime.future() returns a random future date

dunna.datetime.future();
ParameterTypeDescriptionDefault
minFutureYearsstringSpecify the maximum number of years in the future1
maxFutureYearsstringSpecify the minimum number of years in the future10

Past

dunna.datetime.past() returns a random past date

dunna.datetime.past();
ParameterTypeDescriptionDefault
minPastYearsstringSpecify the maximum number of years in the past1
maxPastYearsstringSpecify the minimum number of years in the past10

Near

dunna.datetime.near() returns a random date near the current date

dunna.datetime.near();
ParameterTypeDescriptionDefault
minFutureDaysstringSpecify the maximum number of days in the future1
maxFutureDaysstringSpecify the minimum number of days in the future10

Between

dunna.datetime.between() returns a random date between the two dates

dunna.datetime.between({
min: new Date(),
max: new Date(),
});
ParameterTypeDescriptionDefault
minstringSpecify the minimum date-
maxstringSpecify the maximum date-