mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-27 19:11:56 +02:00
Merge pull request #25468 from overleaf/ii-flexible-licensing-invoice-date
[web] FL next invoice date formatting GitOrigin-RevId: 5f4f86d4f11c7ee217ff806d26fc3f8a79e5affc
This commit is contained in:
@@ -156,7 +156,8 @@ function CostSummary({ subscriptionChange, totalLicenses }: CostSummaryProps) {
|
||||
),
|
||||
date: formatTime(
|
||||
subscriptionChange.nextInvoice.date,
|
||||
'MMMM D'
|
||||
'MMMM D',
|
||||
true
|
||||
),
|
||||
}
|
||||
)}
|
||||
|
||||
@@ -100,7 +100,11 @@ function UpgradeSummary({ subscriptionChange }: UpgradeSummaryProps) {
|
||||
subscriptionChange.nextInvoice.tax.amount,
|
||||
subscriptionChange.currency
|
||||
),
|
||||
date: formatTime(subscriptionChange.nextInvoice.date, 'MMMM D'),
|
||||
date: formatTime(
|
||||
subscriptionChange.nextInvoice.date,
|
||||
'MMMM D',
|
||||
true
|
||||
),
|
||||
}
|
||||
)}
|
||||
{subscriptionChange.immediateCharge.discount !== 0 &&
|
||||
|
||||
@@ -11,8 +11,13 @@ moment.updateLocale('en', {
|
||||
},
|
||||
})
|
||||
|
||||
export function formatTime(date: moment.MomentInput, format = 'h:mm a') {
|
||||
return moment(date).format(format)
|
||||
export function formatTime(
|
||||
date: moment.MomentInput,
|
||||
format = 'h:mm a',
|
||||
utc = false
|
||||
) {
|
||||
const momentDate = utc ? moment.utc(date) : moment(date)
|
||||
return momentDate.format(format)
|
||||
}
|
||||
|
||||
export function relativeDate(date: moment.MomentInput) {
|
||||
|
||||
Reference in New Issue
Block a user