Java its easy, use the Gregorian Calendar
import java.util.Date;
import java.util.GregorianCalendar;
public static boolean isOptionsExp(Date d){
GregorianCalendar gc1 = new GregorianCalendar();
gc1.setTime(d);
if (...
In China red is considered good luck. They where red belts around the new year and give red envelopes full of money to the young. I am not sure of the significance of green, but it makes since they don't use red for down.