Number of Days Between 2 Dates.

F

Fred Goldberg

I have the current releace of ActiveState for Win32.

I'm confused by the shear number of time and date modules and exactly what
they are capable of doing. I need help calculating the number of days
(including weekends) between two dates. All dates are in the format of
mm/dd/yyyy. This format can be changed if needed.

What module is best to use and what is the format of the function. Thanks.

Fred
 
B

Brendon Caligari

Fred said:
I have the current releace of ActiveState for Win32.

I'm confused by the shear number of time and date modules and exactly what
they are capable of doing. I need help calculating the number of days
(including weekends) between two dates. All dates are in the format of
mm/dd/yyyy. This format can be changed if needed.

What module is best to use and what is the format of the function. Thanks.

Time::Local should do the trick

The docs are pretty straight forward. timelocal is most likely the
function you're after.

B.
 
G

Gunnar Hjalmarsson

Fred said:
I'm confused by the shear number of time and date modules and
exactly what they are capable of doing. I need help calculating the
number of days (including weekends) between two dates. All dates
are in the format of mm/dd/yyyy. This format can be changed if
needed.

What module is best to use

Probably Date::Calc.
and what is the format of the function.

See the docs for the module. Reading the docs doesn't confuse you,
does it?
 
J

Jim Keenan

Fred said:
I have the current releace of ActiveState for Win32.

I'm confused by the shear number of time and date modules and exactly what
they are capable of doing. I need help calculating the number of days
(including weekends) between two dates. All dates are in the format of
mm/dd/yyyy. This format can be changed if needed.

What module is best to use and what is the format of the function. Thanks.

Fred
As other posters have stated, try Date::Calc. I use it in production
code at work. IIRC, ActiveState has a ppm for Date::Calc which means
that you don't need to have an installed C-compiler to install it. And
DeltaDays is indeed the function you want to use.

jimk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top