接入前端P0页面真实接口
This commit is contained in:
1 parent
5c5b8e33b0
commit
66a613d6cd
45 files changed
+8719
No files matched your search
@@ -0,0 +1,18 @@
|
||||
export function formatReservationDateTime(value: string | null | undefined): string {
|
||||
if (!value) {
|
||||
return '-'
|
||||
}
|
||||
return value.replace('T', ' ').replace(/\+.*$/, '')
|
||||
}
|
||||
|
||||
export function formatReservationDateRange(arrivalDate: string, departureDate: string): string {
|
||||
return `${arrivalDate} / ${departureDate}`
|
||||
}
|
||||
|
||||
export function formatReservationCurrency(amount: number, currencyCode: string): string {
|
||||
return new Intl.NumberFormat('zh-CN', {
|
||||
style: 'currency',
|
||||
currency: currencyCode,
|
||||
maximumFractionDigits: 0,
|
||||
}).format(amount)
|
||||
}
|
||||
Reference in new issue
Block a user