nlafferty has asked for the wisdom of the Perl Monks concerning the following question:
################ BEGIN TIME TOTALING SUBROUTINE sub calc_total{ # HAVE TO CONVERT TIME INPUT if ($row[3] >= 52.5) {$start_minute = 1.0 ;} elsif ($row[3] >= 37.5) {$start_minute = .75 ;} elsif ($row[3] >= 22.5) {$start_minute = .5 ;} elsif ($row[3] >= 7.5) {$start_minute = .25 ;} else {$row[3] = .0 ;} if ($row[5] >= 52.5) {$end_minute = 1.0 ;} elsif ($row[5] >= 37.5) {$end_minute = .75 ;} elsif ($row[5] >= 22.5) {$end_minute = .5 ;} elsif ($row[5] >= 7.5) {$end_minute = .25 ;} else {$row[5] = .0 ;} $start_total = $row[2] + $start_minute; $end_total = $row[4] + end_minute; $total_time = $end_total - $start_total; } ################ END TIME TOTALING SUBROUTINE
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Time Totaling
by Zaxo (Archbishop) on Aug 02, 2001 at 01:43 UTC | |
|
Re: Time Totaling
by VSarkiss (Monsignor) on Aug 02, 2001 at 02:33 UTC | |
|
Re: Time Totaling
by nlafferty (Scribe) on Aug 02, 2001 at 01:51 UTC | |
by lestrrat (Deacon) on Aug 02, 2001 at 06:14 UTC | |
|
Re: Time Totaling
by nlafferty (Scribe) on Aug 02, 2001 at 22:54 UTC |