feat: implement license platform business flows and delivery tooling
Add admin and customer interfaces, orders, signed activation and leases, protected package delivery, keyring verification, migrations, security controls, tests and deployment documentation. Co-Authored-By: Craft Agent <agents-noreply@craft.do>
This commit is contained in:
16
frontend/src/date-format.ts
Normal file
16
frontend/src/date-format.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
const formatter = new Intl.DateTimeFormat('zh-CN', {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
second: '2-digit',
|
||||
hour12: false,
|
||||
})
|
||||
|
||||
export function formatDateTime(value: string | Date | null | undefined, empty = '—'): string {
|
||||
if (!value) return empty
|
||||
const date = value instanceof Date ? value : new Date(value)
|
||||
if (Number.isNaN(date.getTime())) return empty
|
||||
return formatter.format(date).replace(/\//g, '-')
|
||||
}
|
||||
Reference in New Issue
Block a user