rcotten has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks... been using perl for a while now but this one has got me stumped. I have multiple lines in a .csv they all have start stop dates and total time on each line. I need to look for dates (across multiple lines) that are consecutive. accounting for weekend and holidays.
IE. input.csv employid, start, stop, total 1234, 01/04/2013, 05/04/2013, 5 1234, 08/04/2013, 12/04/2013, 5 1234, 18/04/2013, 18/04/2013, 1 5678, 01/01/2013, 01/01/2013, 1 output.csv employid, start, stop, total 1234, 01/04/2013, 12/04/2013, 10 1234, 18/04/2013, 18/04/2013, 1
I have the open/close and csv reading fine with CSV::Text. I am pretty confident on the looping etc.. I'm just not sure the best way to look through file for a matching employid and then take into account weekends and holidays. Suggestions on modules and how to proceed?
Was seeing a lot of talk about Date::Calc..
Thanks ray
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Date::Calc and comparing across arrays?
by hdb (Monsignor) on Apr 09, 2013 at 08:12 UTC | |
by rcotten (Initiate) on Apr 10, 2013 at 00:40 UTC | |
by hdb (Monsignor) on Apr 10, 2013 at 08:18 UTC | |
by rcotten (Initiate) on Apr 11, 2013 at 07:17 UTC | |
|
Re: Date::Calc and comparing across arrays?
by Anonymous Monk on Apr 09, 2013 at 07:01 UTC |