In this case, you can set the cost using pricing components.
Create a separate pricing component for each duration.
For example: 1 week, 2 weeks, 3 weeks, etc.
In each component, limit it to the appropriate number of days.
This can be done on the Constraints tab:
Alternatively, you can set a single formula based on the number of days booked.
Let's make a formula for months.
For example, the cost is $1000 / month.
$1000 is multiplied by the number of booked days that are divided by 31 (a number of days in a month).
Since the months are different, there may be inaccuracies of several days for long bookings.
1000 * Ceiling([INTERVALS]/31)
In this formula, we used the Ceiling function.
It rounds the number up.
For the formula of weeks, simply replace 31 with 7.
See this example in action: