(id: any)
| 176 | |
| 177 | /** Pretty session label from an id like "20260529_011608_ab12cd". */ |
| 178 | export function sessionLabel(id: any): string { |
| 179 | const txt = String(id == null ? "" : id); |
| 180 | const m = txt.match(/^(\d{4})(\d{2})(\d{2})_(\d{2})(\d{2})(\d{2})/); |
| 181 | if (m) return `${m[1]}-${m[2]}-${m[3]} ${m[4]}:${m[5]}`; |
| 182 | return short(txt, 36); |
| 183 | } |
| 184 | |
| 185 | export function sessionTail(id: any): string { |
| 186 | const txt = String(id == null ? "" : id); |
no test coverage detected