Calculate the discounted rate for large projects

I don’t know how to solve the task below. Can someone help me?

Often, the freelancer’s clients hire them for projects spanning over multiple months. In these cases, the freelancer decides to offer a discount for every full month, and the remaining days are billed at day rate. Every month has 22 billable days. Help them estimate their cost for such projects, given an hourly rate, the number of days the project spans, and a monthly discount rate. The discount is always passed as a number, where 42% becomes 0.42. The result must be rounded up to the nearest whole number.

What language are you working in? Or do you want to discuss it abstractly?

@glennj To clarify, the text posted above is part of the freelancer rate exercise in the JavaScript track.

@junedev Thanks. I know elixir has that exercise too, but I didn’t look up the actual instructions.

@Norb1 in this task, you are given an hourly rate, a number of days and the discount rate. Only the days in full months are discounted. You need to calculate how many of the days are part of full months, and how many days are leftover. The leftover days are not discounted. You can reuse the dayRate function.

yes it is a part of JS.

Hi are you still stuck? If yes, can you please post what you have tried so that i can figure out the best way to help you?