Syntactic Confectionery Delight | |
PerlMonks |
Re: Generate Fake datesby marcink (Monk) |
on Jun 27, 2001 at 01:05 UTC ( [id://91754]=note: print w/replies, xml ) | Need Help?? |
An alternative, lazy approach would be to use Date::Manip. It makes formatting a little easier:
Update: okay, I just learned another thing: Date::Manip is slow. Very ;-) I used Benchmark to compare arturo's fakedate with mine: Benchmark: timing 1000 iterations of fakedate_a, fakedate_mk... fakedate_a: 0 wallclock secs ( 0.03 usr + 0.00 sys = 0.03 CPU) @ 33333.33/s (n=1000) (warning: too few iterations for a reliable count) fakedate_mk: 13 wallclock secs (12.76 usr + 0.09 sys = 12.85 CPU) @ 77.82/s (n=1000) Thanks to arturo and OeufMayo for pointing this. -marcink
In Section
Cool Uses for Perl
|
|