Well, let me make sure first - you are dealing with real dates, right? Not
string representations of dates?
Dealing with real dates, you can use simple compare operations - LT, EQ and
GT to bracket a range. If you're dealing with strings....ummmm....I'd
really suggest that you get them into date format ;)
I'm not entirely sure what you mean by span. I presume that you're talking
about a date range.
What I see that you'll need is 2 if statements, each with 4 compare
sections. Probably easier just to write it out. If you're not doing
anything with dates that are in both ranges, just write the conditions so it
ignores them.
<CFIF (
(
(myDate GT oldBeginDate)
AND (myDate LT oldEndDate)
)
AND NOT (
(myDate LT newBeginDate)
AND (myDate GT newEndDate)
)
)>
<!--- date is in the range of old but not new --->
</CFIF>
Brian
-----Original Message-----
From: Chris Martin [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 11, 2000 5:17 PM
To: CF-Talk
Subject: Testing for dates in a span
Hey everyone. I was wondering if it is possible to check if a given dates
exists in a span (maybe and InSpan() function?)
Basically, I need to create two spans, old and new. Any date that is in
old, but not in new, must be deleted. Any dates that are in new but not old
must be added. Any dates that are in both old and new can be left alone.
The way things look now, I think its going to take lots of cfif, cfelseif,
cfesle statements.
Anyone have any ideas?
thanks,
Chris Martin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists