MCPcopy Create free account
hub / github.com/parse-community/parse-dashboard / formatDateCompact

Function formatDateCompact

src/lib/GraphDataUtils.js:129–141  ·  view source on GitHub ↗
(date)

Source from the content-addressed store, hash-verified

127 * @returns {string} Formatted date string
128 */
129export function formatDateCompact(date) {
130 if (!date || !(date instanceof Date) || isNaN(date.getTime())) {
131 return '';
132 }
133
134 const year = date.getUTCFullYear();
135 const month = String(date.getUTCMonth() + 1).padStart(2, '0');
136 const day = String(date.getUTCDate()).padStart(2, '0');
137 const hours = String(date.getUTCHours()).padStart(2, '0');
138 const minutes = String(date.getUTCMinutes()).padStart(2, '0');
139
140 return `${year}-${month}-${day} ${hours}:${minutes}`;
141}
142
143/**
144 * Filter data based on column type and chart requirements

Callers 1

processBarLineDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected