(dateValue)
| 4279 | } |
| 4280 | |
| 4281 | function formatChatDateLabel(dateValue) { |
| 4282 | const date = String(dateValue || "").slice(0, 10); |
| 4283 | if (!date) return ui().chat.ungrouped; |
| 4284 | if (date === todayDateValue()) return ui().chat.today; |
| 4285 | const yesterday = new Date(); |
| 4286 | yesterday.setDate(yesterday.getDate() - 1); |
| 4287 | const yesterdayValue = `${yesterday.getFullYear()}-${String(yesterday.getMonth() + 1).padStart(2, "0")}-${String(yesterday.getDate()).padStart(2, "0")}`; |
| 4288 | if (date === yesterdayValue) return ui().chat.yesterday; |
| 4289 | return date; |
| 4290 | } |
| 4291 | |
| 4292 | function formatChatTime(value) { |
| 4293 | const text = String(value || ""); |
no test coverage detected