koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Koha-devel] Re: [Koha] Due dates


From: Chris Cormack
Subject: Re: [Koha-devel] Re: [Koha] Due dates
Date: Mon Feb 17 02:02:11 2003
User-agent: Mutt/1.3.28i

On Mon, Feb 17, 2003 at 08:54:59AM -0000, Anthony W. Youngman said:
> Something else to think about ...
> 
> What if the due date falls on a holiday? It's all very well saying "you've
> got two weeks" or whatever it is, but especially over the New Year period
> the due date could be the last day of a five-day break so the borrower is
> almost a week short of their allotted time.
> 
> I was going to say "you should add ten working days", but for a library
> that's probably irrelevant. What you probably need to do is add an "extend a
> holiday to the next working day" module.
> 
Hiya

Yep thats the beauty of the Date::Manip module, you can do just that :)
Things like
$date=&Date_NextWorkDay($date,$off [,$time]);

or

$name=&Date_IsHoliday($date);

You can then define your holidays in the config file.

The holiday section of the config file is used to define holidays. Each line
is of the form:

   DATE = HOLIDAY
   
   HOLIDAY is the name of the holiday (or it can be blank in which case the
day will still be treated as a holiday... for example the day after
Thanksgiving or Christmas is often a work holiday though neither are named).

Its really rather neat.

Have a look at the Date::Manip man pages if you are interested.

Chris
-- 
Chris Cormack                                                     Programmer
025 500 789                                        Katipo Communications Ltd
address@hidden                                          www.katipo.co.nz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]