-
-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monthly recurring payments at end of month have various problems #551
Comments
The calendar page uses PHP's built-in function strtotime() to calculate the next month. PHP is doing all the work behind the scenes using its own internal logic.
PHP handles how months and dates interact, including leap years and varying month lengths (28, 30, or 31 days), so there are no manual date calculations in the code. The strtotime() function is designed to handle these date shifts accurately and efficiently. This means I'm not manually calculating dates, but rather relying on PHP to perform the operation. I know most subscriptions don't rollover like this. I have some that do, and some that don't. And I decided to not overcomplicate. |
I understand, thanks for the explanation. I guess then for myself, as a workaround, I will just move the date in Wallos to the 28th of the month.
Isn't a subscription that rolls over like this essentially a subscription that renews every 30 (or 31) days instead of one that renews every month? Because I also have a subscription like this which due to renewing every 30 days gradually shifts towards earlier days of the month. |
Yes, usually 30 days, I believe. I see it mostly on insurances. The issue is that there's only the next_payment_date field. So if I calculate from January 30th to February 28th, I have no way to then know that it should go back to March 30th. When I have some time, I'll give it a thought. |
I think the problem might also be that when I enter the subscription, I only set the "next payment" date. If I do this in November, I would naturally enter the 30th and it wouldn't become the 31st for December. |
Problem
Create a new subscription repeated every month.
Select next payment to be on 2024-10-31. On the calendar this is show on the first of the month except the next:
Select next payment to be on 2024-10-30. On the calendar this is show on:
Suggestion:
Check the actual day of month for monthly recurring payments and if a month doesn't have that day (because it's shorter) then take the last day of this month instead. However it should still keep the original day of month for all months that have this day.
The text was updated successfully, but these errors were encountered: