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

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Dear Monks,
Im in need to do a report of calls per Timeframe, i will give some Infos what i mean.

what i have is the start time and the duration

Examples: format is yyyyddmmhh24miss;seconds

Based on that data i need to put the duration in propper Timeframes, the Frames are:

The Result should look like this

Start Time7-99-1818-1919-7weekend

The duration should be sorted to the Timeframes, and if a call is on a weekend but going into a monday,
then the rest of the duration need to be sorted as well.

Im at the Beginning of writing the script,
i would Go with Date::Calc for the date calculations and a while duration > 0 loop with alot of IF's to split the duration into the propper slots.

A hint how to make it better is much aprechiated

kd ultibuzz

In reply to Sorting Call durations into Timeframes by ultibuzz

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

  • 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, 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, 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.