fix #951 also retroactively

This commit is contained in:
keyan 2024-03-20 20:56:40 -05:00
parent 01d779723f
commit 4b4a5361ef
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ export function nextBilling (relativeTo, billingType) {
export function purchasedType (sub) {
if (!sub?.billPaidUntil) return 'ONCE'
return diffDays(new Date(sub.billedLastAt), new Date(sub.billPaidUntil)) >= 365 ? 'YEARLY' : 'MONTHLY'
return diffDays(new Date(sub.billedLastAt), new Date(sub.billPaidUntil)) >= 364 ? 'YEARLY' : 'MONTHLY'
}
export function proratedBillingCost (sub, newBillingType) {