From 4b4a5361ef29fd0c51325a1e8a44d20b8195b019 Mon Sep 17 00:00:00 2001 From: keyan Date: Wed, 20 Mar 2024 20:56:40 -0500 Subject: [PATCH] fix #951 also retroactively --- lib/territory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/territory.js b/lib/territory.js index 3a3384a3..7e460cb6 100644 --- a/lib/territory.js +++ b/lib/territory.js @@ -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) {