Auto-renewable subscriptions: How long a month is?

这一生的挚爱 提交于 2021-02-07 06:11:40

问题


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 ?


回答1:


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



来源:https://stackoverflow.com/questions/15411408/auto-renewable-subscriptions-how-long-a-month-is

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!