Closed vegaro closed 3 months ago
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
Thanks @vegaro !
This issue has been automatically locked due to no recent activity after it was closed. Please open a new issue for related reports.
From https://community.revenuecat.com/sdks-51/package-billingperiod-value-incorrect-seems-to-be-iso8601-1-instead-of-iso8601-2-4655
I seem to be getting an incorrect value for my free trial billingPeriod on Android.
I thought it would be good to ask here whether I’m understanding this correctly and/or whether to open an issue on GitrHub.
I’ve set the trial period to 90 days in the Play Console, but in the returned package I’m getting 86 days. Looking at the iso8601 value, 84 days corresponds to 12 weeks so it looks like it’s ignoring the 6D. I’ve just learned that iso8601-1 doesn’t allow any other values if W(eeks) is specified but iso8601-2 does. It seems like, although P12W6D is correct (84 days + 6 days = 90 days) the ‘value’ field is showing an iso8601-1 interpretation (84 days only) rather than iso8601-2.
I created a simple test in our test suite and it looks like we are parsing
P12W6D
as 12 weeks (omitting the days). I am not sure how it's getting converted to 86 days in the screenshot since thePeriod.create("P12W6D")
function is creating a 12 week Period, but in any case it should be creating a 90 days Period