[web] Format paused reactivation date in UTC via shared helper (#36600)

The paused branch of getFormattedRenewalDate formatted the reactivation
date in the viewer's local timezone with a hand-rolled format literal,
while the surrounding dates are UTC. Compute the reactivation date in
UTC and format it with formatPaymentDate.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
GitOrigin-RevId: 1f1679c1988c696c16c78bd11152d6a39a20c4e1
This commit is contained in:
Antoine Clausse
2026-09-17 12:00:22 +00:00
committed by Copybot
co-authored by Claude Fable 5
parent 82539b5842
commit 0e510226fa
@@ -32,8 +32,7 @@ import { debugConsole } from '@/utils/debugging'
import { formatCurrency } from '@/shared/utils/currency'
import { ManagedInstitution } from '../../../../../types/subscription/dashboard/managed-institution'
import { Publisher } from '../../../../../types/subscription/dashboard/publisher'
import { formatTime } from '@/features/utils/format-date'
import { formatPaymentDateTime } from '../util/payment-dates'
import { formatPaymentDate, formatPaymentDateTime } from '../util/payment-dates'
type SubscriptionDashboardContextValue = {
groupPlanToChangeToCode: string
@@ -154,10 +153,11 @@ export function SubscriptionDashboardProvider({
return formatPaymentDateTime(personalSubscription.payment.periodEnd)!
}
const pausedDate = new Date(personalSubscription.payment.pausedAt)
pausedDate.setMonth(
pausedDate.getMonth() + personalSubscription.payment.remainingPauseCycles
pausedDate.setUTCMonth(
pausedDate.getUTCMonth() +
personalSubscription.payment.remainingPauseCycles
)
return formatTime(pausedDate, 'MMMM Do, YYYY')
return formatPaymentDate(pausedDate.toISOString())!
}, [personalSubscription])
useEffect(() => {