I'm working on an Android application, where a user can buy a monthly/yearly subscription to unlock content. Since the app is not very dependant on the internet I try to do as less comunication with backend servers as possible. However, I have to check if the user holds a valid subscription.
So my plan is to let the user buy the subscription and set the expiry date to today + 1 month/year.
As long as the current date is before this expiry date, I do not need to check the subscription anymore. But once the current date is after this expiry date, I need to check again if the subscription is still there. If so I need to update the expiry date by another month/year.
But how long is a month/year for Google? A month can be between 28 and 31 days long. A year between 365 and 366 days.