in reply to best way to store date / values
I would recommend one of two ways to "keep" a date/time stamp, and still allow it as a key in a hash.
One is in an ISO-like string format: "YYYY-MM-DD hh:mm:ss". The benefit to this is that it's still human-readable AND will sort properly. There's no worrying about whether Jan sorts after Feb, or what the French word for August might be. Note the biggest time units come first and the smallest come last. Use leading zeroes and 24 hours.
The other is just as a single integer, called "epoch time", "Unix time" or "Perl time." It's what time() returns. Zero refers to the time at 1970-01-01 00:00:00 GMT. It still works as hash keys, still sorts (but numerically, not ascibetically), it's still printable, but it's easier for computers to deal with later. The drawback is that it supports little more than one century (1970 +- 60ish years) in range if using a signed 32 bit value.
--
[ e d @ h a l l e y . c c ]
|
|---|