Recomemded way to select/choose a day of a month (up to 31) in Flutter? - flutter

Flutter has a showTimePicker and a showDatePicker. But for those who only want to choose a day between 1 and 31 is there a similar made solution?
If not there are manny options to build this, so what is the most adequated (material widget?)?
In this case, the goal is to select the day of the month at which a monthly recurring payment will provide alerts and notify the missing payments.
Note: It is okay to be 31 if the user wants it to be at the end of each month, since the way I'm implementing is comparing the int of current day with the select day, so no worries about Febreuary and month with 30 days

Related

add a conditional start date to a payment function

I am building a financial model and adding loan payments, and want the payments to start on a conditional start date.
I can calculate the PMT amount for a loan, but cant seem to get the payments PMT to show up in the specific start date (month) and to end when the balance is 0.
[1]: https://i.stack.imgur.com/4VWzk.png
I have a start date in Column J and calculated the payment, but I get an error message.
I tried the following, but not sure where I am going wrong.
J61 pmt start date either Jan 1 or June 1 2023
S2- start of the month
S4- end of the month
PMT(rate, nper, pv, [fv], [type]) this works
NPER= number of payments
=IFERROR(IF(AND(J61>S3,J61<=S4,1,0)),PMT(G61/H61,I61*H61,F61))
Not sure how to incorporate the ending balance into this formula.
End date with Balance equals= 0
Since your financial model has monthly granularity of calculations, it is not clear how you want to allocate the payments for loans that have intra-month start dates.
Here is a very simple solution that will not allocated pro rata for the days of a month, but allocated the total monthly payments starting with the month of the start date.
=(S$4>=$J61)*(S$4<=EDATE($J61,$H61)-1)*$K61
Which looks like this
So, as you can see in the screenshot, although the start date for the 1st loan is the 31st of January, there will already occur the full PMT amount for the month of January in the timeline.

Google Sheets: Automatically Increment Date by 1 Month

I am currently using a budget sheet that automatically updates date cells to the next "payment" date for a bill. As an example:
=VALUE("2019-03-08")+14*FLOOR((NOW()-VALUE("2019-03-08"))/14)
The cell starts with a date and it then updates every 14 days to the new date. This shows me a cell that has the date of the biweekly payment that is due. In the above example, the cell shows the value of "2019-03-08" until 2 weeks have passed. Once 14 days have passed, the cell will automatically upload to "2019-03-22". This automation will continue forever in 14-day increments. The date displayed in the cell will always update automatically to the next 14-day date. This helps me display the exact due date of a biweekly payment without updating the cell.
I want to do the same thing for a monthly payment, but using a day count of 30 is not very accurate. Is there a way to modify this method to let me update the date automatically to the 24th of the month, every month, on that day. So I start with 2/24/2019 and when 3/24/2019 hits, the cell updates to that date, and so on. The reason this is not accurate is that the months are not all 30 day periods. February is 28 days and some are 31 days. I want the cell to increment in 1 month periods in the same way that the above formula updates in 14-day increments. As an example: The date will display "2/24/2019" until the same day on the next month occurs, then the cell will update to "3/24/2019". This process will continue forever with 4/24/2019, 5/24/2019, etc. It will continue with the year as well, so 12/24/2019 will change automatically to 01/24/2020.
UPDATE: Updated the description with examples of how the behavior works and what I am looking for...
It's much simpler than this. Use the EDATE function (e.g.):
=EDATE(A1,1)
Where A1 is your starting date and 1 is the number of months you which to increment by. See https://support.google.com/docs/answer/3092974?hl=en for more details.
this formula will increase the month every 24th and accounts for year change as well
=IF(DAY(TODAY())>=24,
DATE(YEAR(TODAY()), MONTH(TODAY())+1, 24),
DATE(YEAR(TODAY()), MONTH(TODAY()), 24))
paste where you need and drag down:
=VALUE("2019-"&ROW(A3)&"-08")+14*FLOOR((NOW()-VALUE("2019-"&ROW(A3)&"-08"))/14)

PayMill subscription interval regularity

Simple questions, but I can't seem to find the answers in PayMill's API documentation or FAQ:
If a payment subscription is classed as monthly, does it poll for the funds every 30 days or on the anniversary of the month, i.e. set up on 15.4.2014, next payment 15.5.2014?
If it polls on the same date every month, what happens if the subscription was set up on the 31st of the month, i.e. on a date not present in February, April etc?
Thanks.
On the same date. If the interval is 1 MONTH and the first payment occurs on 15.4.2014 the next one will be on 15.5.2014. Note that you can also specify a weekday, in that case it will be the next weekday (e.g. Monday), either the 15.05.2014 (if it's a Monday) or the first Monday after 15.05.2014
It will probably be on the next day (1 March instead of the "missing 31 February". It will definitely not be skipped. If the exact behavior is crucial for your business, please contact the PAYMILL support to seek a definite answer.

Auto-renewable subscriptions: How long a month is?

I got confused about some issues:
1: The one month duration of auto-renewable subscriptions is 30 days or does it depend on a natural month?
Because I can only test in sandbox mode,so the duration is just several minutes...
Maybe Apple just simply calculates it like this: 2013\01\15 -> 2013\02\15 -> 2013\03\15. If so,the second issue comes up
2: For example: I buy a monthly auto-renewable subscriptions at 2013\03\31 ,because 2013\04 only has 30 days, then what is the expires_date of my subscriptions? 2013\04\30 or 2013\05\01 or other date ?
It's adding 1 month, not 30 days. The number of days in 1 month varies. So purchasing a subscription on 3/31 would end on 4/30.
You can use NSDate, NSCalendar, and NSDateComponents to add a month to a date and see how long it will last. More info here: Modifying NSDate to represent 1 month from today
I can confirm this from my own app's data on both iOS and Android.
If someone purchases a monthly renewing subscription on, for example, the 15th of one month, then it will renew on the 15th of the next month, irrespective of how many days were in the month.
If someone purchases the subscription on the 31st of March, then it will renew on May 1st (because April has no 31st day, the renewal date will jump to the next available day in the calendar year - this also applies to February in a leap year, etc).
Given this, and assuming your app's primary income is from subscriptions, over time you should expect to see lower than average sales on the 31st of any given month because there won't be as many renewals. But it is no cause for concern as it is counteracted by the fact that you should expect to see higher than average sales on the 1st of any month that follows a long month anyway. Don't be dissapointed if you check your stats on the 31st of any month.

Repeating end of the month events on iPhone Calendar, problem for February

This is more of an usability problem/bug/question.
I wanted to add an event to occur on the end of the month for every month.
But if I choose October 31 and set Repeat Event -> Every Month, all months ending in 30 are left out (including 28-feb).
So, I could solve this by putting the end of the month at 30, and only miss out on February... But I need it to be on the 31, when the month ends in 31; 30 when it ends in 30; and 28 or 29 for February.
The Calendar app doesn't detect that I want it "Every Month at the end of the month".
I can't create an event for 30 and another for 31 because I would have the same event twice on months ending in 31.
So, anyone have a way around this?
Of course, going to each month and setting it is not an answer I'm looking for. And requesting 28-day 13-month calendars isn't either.
Set the graphic calendar solution aside, and try something like:
Repeat event <Monthly> on <first> <Friday>
Repeat event <Monthly> on <last> <day>
Translate that to a programmatic schedule as needed.
I am frustrated by the same issue. Although it is not a programming solution, you could solve it by setting the calendar item for the 1st of the month and set a reminder to popup on the day before the event.