I have an app which is used to calculate the paychecks of a number of employees.
The paychecks are calculated from the 21st in a month to the 20th in the next month. So when the employee uses the app I need to find these two dates (start_date and end_date) based on the date today.
How can I do that? Something like beginning_of_month + 21 doesn't work because when it's the 3rd in a month it's beginning_of_last_month..
Any simple way to find the last 21st date and the next 20th date ?