Spaces:
Runtime error
Runtime error
| function getPriorityEmoji(deadlineTime) { | |
| if (!deadlineTime) return ''; | |
| const now = new Date(); | |
| const hoursLeft = (deadlineTime - now) / (1000 * 60 * 60); | |
| if (hoursLeft < 0) { | |
| return 'π'; // Overdue / Missed | |
| } else if (hoursLeft <= 24) { | |
| return 'π΄'; // Less than 24 hours | |
| } else if (hoursLeft <= 72) { | |
| return 'π‘'; // Less than 3 days | |
| } | |
| return 'π’'; // More than 3 days | |
| } | |
| module.exports = { getPriorityEmoji }; | |