Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Tweak validDateRangeForPlan

Tim Wilsonb550b7eb8d3f
diff --git a/apps/web/lib/analytics/utils.ts b/apps/web/lib/analytics/utils.ts
index 058196a64d..75d53aa4dc 100644
--- a/apps/web/lib/analytics/utils.ts
+++ b/apps/web/lib/analytics/utils.ts
@@ -68,8 +68,8 @@ export const validDateRangeForPlan = ({
plan === "pro" &&
(interval === "all" ||
(start &&
- (getDaysDifference(start, new Date(Date.now())) > 365 ||
- getDaysDifference(start, end || new Date(Date.now())) > 365)))
+ (getDaysDifference(start, new Date(Date.now())) > 366 ||
+ getDaysDifference(start, end || new Date(Date.now())) > 366)))
) {
if (throwError) {
throw new DubApiError({