Looking for advice on Date modules

A

Alihahd

Hi all,

I'm after a little advice please. I'm writing two systems at the moment
(both with web front ends, though that's nothing to do with the question),
for use at home. Both require dates, etc, so I'm looking for suitable
modules to use.

The first system is easy enough; it's sort of a diary system. It prints a
calendar for the current month. The system will allow you to click on a
date, then will go away and do something with the relevant file. What's the
best module to use to calculate and display the calendar?

The second is marginally more sophisticated, in that it's for us to keep
track of our expenses. It displays all the transactions that have occured
within a specified time period. There's a seperate file of automated
payments that occur each month. The system should check the current date
and the date the system was last updated, and automatically insert any
automated payments that have occured since the last update. For this, I
need to accurately calculate the difference in dates, and insert
information as required. For instance, if I've not updated the system for
two months, it should insert each payment twice, and accurately incorporate
the full date from the given day-of-month. Best module for this, anyone?

For info, I'm about to start playing with Date::DateManip, having just
downloaded it. Good way to go?

Cheers!

Alihahd
 
G

gnari

Alihahd said:
Hi all,

I'm after a little advice please. I'm writing two systems at the moment
(both with web front ends, though that's nothing to do with the question),
for use at home. Both require dates, etc, so I'm looking for suitable
modules to use.


For info, I'm about to start playing with Date::DateManip, having just
downloaded it. Good way to go?

assuming you mean Date::Manip

this module is great, except that is not the fastest, and it is
relatively large and could affect start-up overhead.

if you are using a lot of date calculations in a web environment,
this module and mod_perl together are great.

I you also use a database, I suggest looking into just storing the
Date::Manip
format values into varchars and not using date-time columns.

for short simple scripts Date::Manip is overkill and not the most effective,
but if you do not care about speed (too much), it is great, specially if you
have to
parse a lot of different date formats.

gnari
 
T

Tore Aursand

The first system is easy enough; it's sort of a diary system. It prints a
calendar for the current month. The system will allow you to click on a
date, then will go away and do something with the relevant file. What's the
best module to use to calculate and display the calendar?

Date::Calc has a Calendar() function.
The second is marginally more sophisticated, in that it's for us to keep
track of our expenses. It displays all the transactions that have occured
within a specified time period. There's a seperate file of automated
payments that occur each month. The system should check the current date
and the date the system was last updated, and automatically insert any
automated payments that have occured since the last update. For this, I
need to accurately calculate the difference in dates, and insert
information as required. For instance, if I've not updated the system for
two months, it should insert each payment twice, and accurately incorporate
the full date from the given day-of-month. Best module for this, anyone?

Date::Calc also have functions for comparing dates, ie. getting the
"distance" between two dates.

When dealing with dates, I've always preferred Date::Calc. It's fast
(written in C), and it has a nice set of functions/features.


--
Tore Aursand <[email protected]>
"Scientists are complaining that the new "Dinosaur" movie shows
dinosaurs with lemurs, who didn't evolve for another million years.
They're afraid the movie will give kids a mistaken impression. What
about the fact that the dinosaurs are singing and dancing?" -- Jay
Leno
 
D

Dave Cross

The first system is easy enough; it's sort of a diary system. It prints a
calendar for the current month. The system will allow you to click on a
date, then will go away and do something with the relevant file. What's the
best module to use to calculate and display the calendar?

Have you looked at Calendar::Simple?
The second is marginally more sophisticated, in that it's for us to keep
track of our expenses. It displays all the transactions that have occured
within a specified time period. There's a seperate file of automated
payments that occur each month. The system should check the current date
and the date the system was last updated, and automatically insert any
automated payments that have occured since the last update. For this, I
need to accurately calculate the difference in dates, and insert
information as required. For instance, if I've not updated the system for
two months, it should insert each payment twice, and accurately incorporate
the full date from the given day-of-month. Best module for this, anyone?

For info, I'm about to start playing with Date::DateManip, having just
downloaded it. Good way to go?

You should look at the work being done by the Perl date/time project
(http://datetime.perl.org/) particuarly the DateTime module.

Dave...
 

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

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,043
Members
48,769
Latest member
Clifft

Latest Threads

Top