Price calculation based on time elapsed

Hey all,

Well I can’t find a common solution for calculating price based on time elapsed and I thought you guys could help me a bit to find an appropriate solution.

So, I need to calculate price like this:
24h - 40€
30h - 50€
36h - 60€
42h - 70€
48h - 80€, so this is it basically for 2 days and the rest should be like this
+8 remaining days the price is 40€ per day plus 2 days elapsed 80€ and for 10 following days price should be 30€ per day, and the rest +20 days and on price should be 20€ per day

Quit complex, isn’t it!!

Thanks in advance,
mightysnake

[FPHP]if[/FPHP],[FPHP]if[/FPHP], [FPHP]if[/FPHP] and more [FPHP]if[/FPHP].

So if the time lapsed is up to 10 days the charge is: 40E per day.

if the time lapsed is 10 - 20 days the charge is 400E + n Days at 30E per day.

If the time lapsed is greater than 20 days the charge is 400 + 300 + n days at 20E per day.

So for some concrete examples;

5 days = 200Euros (5x40)
15 days = 650Euros (400 + 5x30)
25 days = 800Euros (400 + 300 + 5x20)

Is this correct?

I… think it’s more…
5 days = 200 Euros (3x40 + 80 for the first two)
15 days = 550 Euros (80+8x40+5x30)
25 days = 700 Euros (80+8x40+10x30+5x20)

At least, thats how I read it.

Well, for the first day no matter if hours are lower than 24 price would be 40€. After, every 6 hours we charge 10€ which means the total of 40€ and 10€ for 6hours.
So, this is basically for 48h and after that, next 8 days the calculation will be like so:
1day = 40€ plus 80€ for 48hours
8days = 320€ plus 80€ for 48hours

So, if he/she stays more than than 10 days then the price per day should be 30€ plus 400€ for first 10 days.

And if he/she stays more than 20 days and on then the price per day should be 20€ plus 700€ for previous 20 days

Hope, I’m making myself clear and believe me this calculation is giving me a headache

Do you know, in advance, how many days/hours are being purchased?

What is the correct charge for:

5, 15 and 25 days, and exactly which charges made up each of those amounts. Simple enough question.