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 .
waiting for a prompt respond.
regards,
shifan
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 .
waiting for a prompt respond.
regards,
shifan