Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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?
Peddle faster monkeys!! I need more power!!

In reply to Work Roster Calcuation by Smaug

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-21 13:44 GMT
Find Nodes?
    Voting Booth?

    No recent polls found