It seems to be nothing complicated, just the brain is already boiling (
There are 3 dates. For each you need to choose a specific color:
- Red if it has not come yet.
- Orange if it has not come yet, BUT and the previous one has not come (that is, it goes next).
- Green if already passed.
Those. Need a function that will receive 3 dates as input. or 2. Ie I can't come up with the correct function architecture. It should return only color. And it will be called 3 times. Not for 1 time produces colors, but 3 times. Dates can be 2.
What is it for? For X stages set time. For example, the first is 12/04/2012, the second is 13/04/2012, the third is 04/14/2012
Now - 04/07/2012. So now is the first stage. It will end on 12.04 and then the second stage will begin.
Here you need to visually display.
get_color(time(),date1,date2)
, for the thirdget_color(date2,date3,time())
. - lnart