DateTime-Event-Random
view release on metacpan or search on metacpan
lib/DateTime/Event/Random.pm view on Meta::CPAN
my $random_set = DateTime::Event::Random->new( duration => $dur );
If I<span> parameters are given, then the set is bounded:
my $rand = DateTime::Event::Random->new(
months => 4, # events occur about 3 times a year
start => DateTime->new( year => 2003 ),
end => DateTime->new( year => 2005 ) );
Note that the random values are generated on demand,
which means that the values may not be repeateable between iterations.
See the C<new_cached> constructor for a solution.
A C<DateTime::Set> object does not allow for the repetition of values.
Each element in a set is different.
The C<DateTime::Set> accessors (C<as_list>, C<iterator/next/previous>)
always return I<sorted> datetimes.
=item * new_cached
( run in 0.796 second using v1.01-cache-2.11-cpan-71847e10f99 )