Advertisement

07.03.2008 at 09:33PM PDT, ID: 23538714
[x]
Attachment Details

Date::Manip calculate business times

Asked by APNFSSC in Perl Programming Language

Tags: Perl

I may have found a bug in date::manip version 5.54 where the business time function returns an incorrect value.

I have changed the configuration in (I only have one)

/usr/lib/perl5/vendor_perl/5.8.8/Date/Manip.pm

To the following
#################################
# Start and end time of the work day (any time format allowed, seconds
# ignored)
$Cnf{"WorkDayBeg"}="09:00";
$Cnf{"WorkDayEnd"}="17:00";
#####################################
If I run the following

$review=&DateCalc("2008070409:00:00", "-  2 business minute");

The result is

2008070315:01:00

I was expecting
 
2008070316:58:00

I'd be interested in feedback if I'm using the module incorrectly?

Alternatively I need a way to be able to subtract an amount of minutes from a timestamp and return the result as a timestamp that fits within a business working week and hours.

Thanks for your time.Start Free Trial
[+][-]07.04.2008 at 06:17AM PDT, ID: 21932940

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.04.2008 at 03:58PM PDT, ID: 21935168

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.05.2008 at 12:05AM PDT, ID: 21936177

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.05.2008 at 05:06AM PDT, ID: 21936724

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.07.2008 at 01:39AM PDT, ID: 21943409

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: Perl
Sign Up Now!
Solution Provided By: nognew
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.07.2008 at 01:41AM PDT, ID: 21943417

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.07.2008 at 03:10AM PDT, ID: 21943732

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.07.2008 at 03:16AM PDT, ID: 21943757

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628