feat(dashboard): verbatim modal + defect feed on /defects (T8)
This commit is contained in:
11
app/utils/datestamp.ts
Normal file
11
app/utils/datestamp.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Compact, locale-free date stamp (DD/MM/YYYY, UTC) for defect listings.
|
||||
* UTC keeps it deterministic across machines and test runs. DotMap keeps its
|
||||
* own shorter DD/MM stamp for the cramped diagonal dot labels.
|
||||
*/
|
||||
export function datestamp(value: string | Date): string {
|
||||
const d = new Date(value)
|
||||
const dd = String(d.getUTCDate()).padStart(2, '0')
|
||||
const mm = String(d.getUTCMonth() + 1).padStart(2, '0')
|
||||
return `${dd}/${mm}/${d.getUTCFullYear()}`
|
||||
}
|
||||
Reference in New Issue
Block a user