MCPcopy Create free account
hub / github.com/error311/FileRise / formatDate

Function formatDate

public/js/sharedFolderView.js:639–652  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

637 }
638
639 function formatDate(value) {
640 if (!value) return '-';
641 let ts = value;
642 if (typeof value === 'string') {
643 const parsed = Date.parse(value);
644 if (!Number.isNaN(parsed)) ts = parsed;
645 }
646 if (typeof ts === 'number') {
647 if (ts < 1000000000000) ts = ts * 1000;
648 const d = new Date(ts);
649 if (!Number.isNaN(d.getTime())) return d.toLocaleString();
650 }
651 return '-';
652 }
653
654 function getExt(name) {
655 const idx = name.lastIndexOf('.');

Callers 1

renderListFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected