If you're going to be converting multiple date strings during the course of a script run, and if the dates are reasonably well bounded, then another approach is to precalculate a set of "yyyy/mm/dd" => integer mappings, set them up to load into a hash (e.g., pre-generate a separate .pl file that does nothing except load up a hash, then require that file into your script), then use table lookup to do the conversion. This is less of a space problem than it might seem: 3653 entries covers a ten year span.
In reply to Re: Converting string to date
by dws
in thread Converting string to date
by marctwo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |