I think it should go something like this but it does not work.
m=thisLayer.marker;
if ((time >= m.comment("left").time) && (time < m.comment("right").time))
{
rotation=-90;
}
else if ((time >= m.comment("right").time) && (time < m.comment("hold").time))
{
rotation=90;
}
else
{
rotation=0
}
Any pointers in the right direction would be appreciated.