There is a table with data and dates. Please help me to make a correct condition so that when it is triggered, the date will be coloured in different colours. The table has a Deadline column. I need the date to be colored red 5 days before the deadline, and gray after the date has passed. In other cases it is black. All in all I'm not really getting it right. The date in the column is written in this order 2023-02-01
moment(currentRow["Deadline"]).fromNow() >= "in 5 days"?'#f50202' : moment(currentRow["Deadline"]).fromNow() > "in 0 days"?
'#0d0d0d' : '#999999'
Tried working with a simple condition if the deadline date is less than the current text is greyed out. I can't find a solution to the more complex condition yet.