mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-01 16:29:29 +00:00
feat(subscription): show expiry times to minute
This commit is contained in:
@@ -149,6 +149,27 @@ export function formatDateTime(
|
||||
return formatDate(date, options, localeOverride)
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化日期时间(精确到分钟)
|
||||
*/
|
||||
export function formatDateTimeToMinute(
|
||||
date: string | Date | null | undefined,
|
||||
localeOverride?: string
|
||||
): string {
|
||||
return formatDate(
|
||||
date,
|
||||
{
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
hour12: false
|
||||
},
|
||||
localeOverride
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化为 date 控件值(YYYY-MM-DD,使用本地时间)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user