Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Dealing with dates (Score:2, Interesting)

    by dws (341) on 2003.05.15 22:03 (#20160) Homepage Journal
    I'm coming to believe that one of the fastest ways of converting a string date to an integer is via table lookup. Look at the string just long enough to figure out which table (or hash, or whatever) to do the lookup from, then use the string as a key. A classic space-for-time trade-off. And with ~365.25 distinct dates per year, it's really not all that much space to deal with 20 years worth of days, even in multiple formats.