I'm having a date calculation problem, which is confusing my logic.
I have an application that accepts debit payments to a bank account, this charge must be generated at least three days before the day to be billed.
I need to pick up the next tenth day of the month, which may be the current month or the next month, depending on the current day.
For example, today is October 7, I need to get the next day 10, as long as starting today has an interval of three days, in this case I need to be returned October 10.
But if today is October 8, I need to pick up the next 10, in which case I need to be returned November 10.
What is the best solution to do this in Ruby?