No such thing as a small change | |
PerlMonks |
Re: Date Ranges Questionby shemp (Deacon) |
on Oct 25, 2005 at 23:22 UTC ( [id://502898]=note: print w/replies, xml ) | Need Help?? |
To gain a bit of a speed increase, you could convert the dates to integer values, as an offset from some base date that all other dates will be after. Choose something like january 1, 1800, or whatever base date is appropriate to your application. The conversion to an offset can be handled by the Date::Calc function Delta_Days(), getting the delta days from the base date to the desired date. Then all of your comparisons can go a little quicker, being integer comparisons, vs date comparisons or whatever.
Kind of an illegitimate cousin of the schwartzian transformation.
I use the most powerful debugger available: print!
In Section
Seekers of Perl Wisdom
|
|