Touches basically says, if something "touches" (crosses into) this time span, then do something.
In the below example, touches says if the punch touches the time span between 8:45am to 1:15pm, call the category "Shift 1". The same logic would follow through with the next two statements (1:15pm - 5:45pm, "Shift 2" and 5:45pm - 10:15pm, "Shift 3").
If (touches (8:45a, 1:15p)) { category=”Shift 1”; }
if(touches(1:15p, 5:45p)) { category="Shift 2"; }
if(touches(5:45p, 10:15p)) { category ="Shift 3"; }
Scripting (Main Page) > Scripting - Keywords (Main Page) > Scripting - Touches
|