Hello,
I have been out of this for some time and I'm now trying yet again to brush off the rust and get back to some coding, so please be patient.....
I need to be able to do some date arithmetic for a work roster. For this I would like to convert a series of dates into Unix Time so that I can easily add and subtract. The problem is the format I'm given the information as shown below:
Mon - Fri { 07:00 - 18:00 }
Sat { 08:00 - 16:00 }
Sun { 09:00 - 13:00 }
08/04/27 {}
08/05/01 {}
08/06/16 {}
08/08/09 {}
08/09/24 {}
08/12/16 {}
08/12/25 {}
08/12/26 {}
09/01/01 {}
What this means is all the hours from Monday to Friday between 07:00 and 18:00. (note: it could also read
7:00 AM - 6:00 PM)
Dates without times specified are holidays where no work is done.
So effectively I need to calculate the amount of working hours taken to complete a task which may take 3 weeks, but only include or exclude the hours as shown above.
I have looked at Date::Manip, but it has numerous warnings stating, "be sure that you REALLY need to use this module".
Should I be looking at something else?
Regards,
Smaug.
Peddle faster monkeys!! I need more power!!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.