At 1:39 PM -1000 17/6/03, Joshua Hoblitt wrote:
What if I wanted to know inside a range of years which had a December 31st that was on a Monday (or on a weekday)?

Maybe we need some module that implements SQL against a dataset of the entirity of time!


$datetime_set = DateTime::SQL->new("SELECT datetime FROM gregorian WHERE month=12 AND day=31 and dow < 6 AND year > 1900 AND year < 2000");

"FROM gregorian" would be optional, and just there for SQL-ness:

$datetime_set = DateTime::SQL->new("SELECT datetime WHERE month=12 AND day=31 and dow < 6 AND year > 1900 AND year < 2000");

Selecting 'datetime' means to return datetime objects. All other accessors are available:

@months = DateTime::SQL->new("SELECT month WHERE dow=5 AND day=13 AND year=2003");
# Get months with Friday 13th.



While I'm only kidding, at the same time it might be a good thing. It would be slow I imagine, but it would be very useful.


Cheers!
Rick

--
--------------------------------------------------------
            There are 10 kinds of people:
  those that understand binary, and those that don't.
--------------------------------------------------------
  The day Microsoft makes something that doesn't suck
    is the day they start selling vacuum cleaners
--------------------------------------------------------
"Write a wise proverb and your name will live forever."
   -- Anonymous
--------------------------------------------------------

Reply via email to