Open olorin37 opened 4 years ago
Another example how it doesn't work (here in case of Workdate class):
# 2020-10-17 is Saturday, and we get:
❯ raku -e 'use Date::WorkdayCalendar; Workdate.new(Date.new("2020-10-17")).say'
2020-10-17
# With WA applied:
❯ raku -e 'use Date::WorkdayCalendar; Workdate.new(Date.new("2020-10-17") -1 ).succ.say'
2020-10-19
If I understand correctly purpose of the function. It should always returns working days. So now programmer is forced to provide working day as the first one of the range to get correct answer.
User can workaround it by
Problematic line: https://github.com/raku-community-modules/Date-WorkdayCalendar/blob/d5adbdad6bb74707f7cb817c3c5de2d337595125/lib/Date/WorkdayCalendar.pm#L87