there are problems with dateDiff(), for certain. try dates that span
Daylight Savings time, I thought the bug was fixed, but I kinda think
that one of the patches, made it wrong again, I cant say for certain,
but, most likely.

....tony

Tony Weeg
sr. web applications architect
navtrak, inc.
[EMAIL PROTECTED]
410.548.2337
www.navtrak.net

Visit http://www.antiwrap.com the next time you want to send a link to a
friend.

-----Original Message-----
From: Jim McAtee [mailto:[EMAIL PROTECTED]
Sent: Friday, June 04, 2004 8:52 PM
To: CF-Talk
Subject: Is this a DateDiff() bug?

ColdFusion 5:

<cfoutput>
<pre>
DateDiff("d", "5/1/2004", "5/31/2004")  = #DateDiff("d", "5/1/2004",
"5/31/2004")# DateDiff("w", "5/1/2004", "5/31/2004")  = #DateDiff("w",
"5/1/2004", "5/31/2004")# DateDiff("ww", "5/1/2004", "5/31/2004") =
#DateDiff("ww", "5/1/2004", "5/31/2004")# </pre> </cfoutput>

Gives:

DateDiff("d", "5/1/2004", "5/31/2004")  = 30
DateDiff("w", "5/1/2004", "5/31/2004")  = 4
DateDiff("ww", "5/1/2004", "5/31/2004") = 4

The docs state that "w" should return the number of "Weekdays", which I
take to mean the number days between the two dates, minus days that fall
on a weekend.

By poking different dates into the two fields I can get the w and ww
results to differ by one, but most often they're the same.

Bug?
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to