Ranges of dates



I'm sure there's a simple way to do this, but I can't seem to find it:

If today is after February 1st and before February 15th then
do valentines
elseif today is after March 1st and before March 17th then
do stpatty's day
elseif today is April 1st then
do April Fool
elseif today is after April 15th and before May 5th then
do CincodeMayo
just do the regular thing
end if

I know about date() and I know about datepart and I know about
month(date()) and day(date()). Right now
I do:

if month(date()) = 2 and day(date()) => 1 and day(date()) < 15 then
'do valentines
elseif month(date()) = 3 and day(date()) < 18 then
'do st pattys
elseif month(date()) = 4 and day(date()) = 1 then
'do April fool
'then I get confused about the best way to do Cinco De Mayo
'do the regular thing
end if

Is there an easier/better way to do this? Thanks in advance for any
tips, solutions, etc.


At least your clock is set to the right date.

: arbpen wote:
: <snip>
: Wrong group... sorry about that.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question