Gossamer Forum
Home : General : Perl Programming :

Date problem

Quote Reply
Date problem
i am trying to make a small program to do a hotel reservation system and i am having some problem with dates.

the hotel has rates made for periods, meaning that for example:

from 01/05/2002 till 30/06/2002 rate for a single room is 100.00 US$

from 01/07/2002 till 31/08/2002 rate for a single room is 200.00 US$ and so on...

i have the rates stored in a text file database with their related periods.

what i need to do is, when a client try to make a reservation and submit the reservation form.

the script should check whether the arrival date and departure date is within the above periods and display rates accordingly.

for example:

if client select the following:

arrival date : 01/05/2002 and departure date: 10/05/2002 the script must display rate is 100.00 US$

of if the client select the following:

arrival date : 25/06/2002 and departure date: 03/07/2002 the script must display rate is from 25/06/2002 till 30/06/2002 is 100.00 US$ and from 01/07/2002 till 03/07/2002 is 200.00 US$

so, can anyone help me to do this without using any perl module, i know that for you guys this is like a pice of cake Wink.

waiting for a prompt respond.

regards,

shifan
Quote Reply
Re: [shifan] Date problem In reply to
The only two modules that spring to mind are:

Hope this helps.

- wil
Quote Reply
Re: [Wil] Date problem In reply to
hi Wil Smile,

thanks for info, i need to do it without using any perl module.

waiting for a prompt respond.

regards,

shifan
Quote Reply
Re: [shifan] Date problem In reply to
In Reply To:
thanks for info, i need to do it without using any perl module.

Why?

And if there is a truely legitimate reason, why not see how the modules do it and implement those parts?
Quote Reply
Re: [Mark Badolato] Date problem In reply to
hi mark Smile,

becuase i dont know how to use the perl module and have never used it before.

i am writing my scripts on windows 98 using IndigoPerl and i dont know how to install perl module.

hope anyone can help me.

regards,

shifan
Quote Reply
Re: [shifan] Date problem In reply to
What have you read on the subject that confused you or that you were unable to understand?
Quote Reply
Re: [Mark Badolato] Date problem In reply to
hi mark,

could you pls, help me on my first post. i have explained everything there.

regards,

shifan
Quote Reply
Re: [shifan] Date problem In reply to
No, you'll need to read up on the subject first and then ask questions about what you don't understand.

You will not learn anything if people give you the answers, without you even trying anything. Perl has an abundance of documentation included with it, and there's a wealth of knowledge at perl.com, amongst other sites