(date)
| 127 | * @returns {string} Formatted date string |
| 128 | */ |
| 129 | export 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 |
no outgoing calls
no test coverage detected