Skip Menu |

This queue is for tickets about the DateManip CPAN distribution.

Report information
The Basics
Id: 17005
Status: resolved
Priority: 0/
Queue: DateManip

People
Owner: Nobody in particular
Requestors: plafer [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 5.44
Fixed in: (no value)



Subject: infinite loop in Date_PrevWorkDay
use Date::Manip; $x = Date_PrevWorkDay("Wednesday", 0, "19:00"); # infinite loop print $x, "\n"; Source of the problem is easy to see in the code: 1. Date_PrevWorkDay sets time to WorkDayEnd. 2. Date_IsWorkDay uses "ge" comparison on time, always returning 0. 3. Ergo, infinite loop near line 3730. (version 5.44) Not wanting to break Date_NextWorkDay or the established "quirks" of Business Mode, I leave the fix (and regression tests?!) to the author.
Fixed in 5.56 and 6.xx