Please code check this for me

Date date = new Date();
Date start_date = new Date()
Date end_date = new Date()
start_date = (Date)getCustomFieldValue("Milestone Start Date")
end_date = (Date)getCustomFieldValue("Milestone Target Date")
String customFieldValue = "";
if (start_date != null && end_date != null && start_date < end_date)
{
//Integer timeframe = new Integer(end_date - start_date)
//Integer timeremaining = new Integer(end_date - date)
    
Double timeframe = new Double(end_date - start_date)
Double timeremaining = new Double(end_date - date)
Double ratio = (Double)(timeremaining / timeframe)
    
if (ratio > 0.2) {
 customFieldValue = "<font color=#33CC33><b>Green</b></font>";
 }
 else if (ratio <= -0.05) {
 customFieldValue = "<font color=#FF0000><b>Red</b></font>";
 }
 else 
 { 
 customFieldValue = "<font color=#FFCC00><b>Yellow</b></font>";
 }
}
return customFieldValue;

Hi @HamdyAtakora,

I think nobody here will be able to help you because you didn’t provide any information on what this is actually about.

Maybe you should take the time to read the “how do I ask a good question” guide of stackoverflow and then edit your question or respond with more information.