We're updating the issue view to help you get more done. 

DateDiff with a datepart of "w" (Weekdays) gives the number of weeks between two dates instead of Weekdays

Description

Problem Description:
When using the DateDiff function with a datepart of "w" (Weekdays), you get the number of weeks between the two dates instead of Weekdays between the two dates. This is exactly the same as using a date part of "ww" (Weeks). The docs are weird because they say "w: Weekdays (same as ww)". My guess is this was originally a bug and then the docs were just updated to reflect the bug instead of just fixing it or something.

Steps to Reproduce:
<cfscript>
weeks = dateDiff("w","2016-06-11","2016-06-21");
WriteDump(weeks);
</cfscript>

http://trycf.com/gist/619f940e10314c161b9f71917417d066/lucee5?theme=monokai

Actual Result:
1

Expected Result:
7

Any Workarounds:
Build your own Weekdays function

Environment

Status

Assignee

Pothys - MitrahSoft

Reporter

Dan Murphy

Sprint

None

Fix versions

Affects versions

4.5.4.001
5.1.0.15

Priority

Critical