count working days

Run Settings
LanguagePerl
Language Version
Run Command
use 5.24.0; use Time::Piece; use Time::Seconds; my $start = '2017-01-01' ; my $end = '2017-05-10' ; my $format = "%Y-%m-%d" ; my $ndays = abs (Time::Piece->strptime($start, $format) - Time::Piece->strptime($end, $format))->days ; my $t = Time::Piece->strptime($start, $format) ; say $t->day; say $ndays; my $workingdays=0; for (0..$ndays){ $t += ONE_DAY ; $workingdays++ unless ($t->day =~ /Sun|Sat/); } print $workingdays;
Editor Settings
Theme
Key bindings
Full width
Lines