Lena2018 has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to calculate the business days between two dates using Date::Manip VERSION='6.75'.
I want to configure the first day of the week to be Sunday. My business days are Sunday to Thursday.
I'm running this code but I'm not getting the desired output. The code considers Friday as a business day - which is not what I want.
use strict; use warnings; use Date::Manip; my $task_start = new Date::Manip::Date; my $task_end = new Date::Manip::Date; my $err = $task_start->parse('2018-12-07 02:52:05'); $err = $task_end->parse('2018-12-09 04:27:00'); $task_start->config('workday24hr',1); $task_end->config('workday24hr', 1); $task_start->config('FirstDay', 7); $task_end->config('FirstDay', 7); my $delta = $task_start->calc($task_end,"business"); print $delta->value()."\n"; 0:0:0:0:21:7:55
What changes should I do to get the following output: 0:0:0:0:04:27:00 ?