-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FreeBusyStatus GetFreeBusyStatus(IDateTime dt) does not handle all day events. #212
Comments
Does #161 have any relevance here? |
Does not seem to be related but I am not up to speed on all your unit test patterns. |
Oh, I was responding to
Contains vs Overlaps is talked about in that thread. A closer reading suggests this is different. |
Here is the fix I am adding to our copy of the code. ` public virtual FreeBusyStatus GetFreeBusyStatus(IDateTime dt)
|
I found this issue in our code and repro-ed in a unit test you can add to your FreeBusy unit test class.
GetFreeBusyStatus() should return Busy for all the asserts but always returns Free.
I believe the issue is GetFreeBusy relies on Period.Contains() to determine if there is an overlap.
foreach (var fbe in Entries.Where(fbe => fbe.Contains(dt) && status < fbe.Status))
I think there needs to be logic that handles all day events which always have T000000
The text was updated successfully, but these errors were encountered: