version 1.2, 2020/08/04 02:22:44 |
version 1.4, 2020/08/04 02:24:44 |
|
|
#!/usr/bin/perl |
#!/usr/bin/perl |
# $AFresh1: report_time,v 1.1 2020/08/04 01:14:42 afresh1 Exp $ |
# $AFresh1: report_time,v 1.3 2020/08/04 01:23:48 afresh1 Exp $ |
use v5.16; |
use v5.16; |
use warnings; |
use warnings; |
|
|
|
|
|
|
foreach my $date ( sort keys %total ) { |
foreach my $date ( sort keys %total ) { |
foreach my $key ( sort keys %{ $total{$date} } ) { |
foreach my $key ( sort keys %{ $total{$date} } ) { |
|
my $hours = $total{$date}{$key}->hours; |
|
|
# round to the quarter hour |
# round to the quarter hour |
my $hours = sprintf "%.2f", |
$hours = sprintf "%.2f", |
25 * sprintf "%.2f", $total{$date}{$key}->hours / 25; |
25 * sprintf "%.2f", $hours / 25; |
|
|
say "$date $hours $key";# if $hours != 0; |
say "$date $hours $key";# if $hours != 0; |
} |
} |
} |
} |
|
|
|
|
my @key = split /\s+/, $descr; |
my @key = split /\s+/, $descr; |
|
|
$key[-1] = $conversions{ $key[-1] } |
$key[-1] = $conversions{ lc $key[-1] } |
if @key < 3 and $conversions{ $key[-1] }; |
if @key < 3 and $conversions{ lc $key[-1] }; |
|
|
return "@key"; |
return "@key"; |
} |
} |