Purpose
Check that a date is a working day (Monday-Friday)

Solution

// sample value
// any date in valid date format:
// d.m.y, m/d/y, m-d-y, y.m.d, y/m/d, y-m-d  
Set V[mydate] "07.01.2018"

Set V[absdate] &V[mydate] * 1
Set V[day_of_week] &V[absdate] / 7 decimals=0
Set V[day_of_week] &V[day_of_week] * 7
Set V[day_of_week] &V[absdate] - &V[day_of_week]

// Saturday ?
if V[day_of_week=-2]
  Message "E: &V[mydate] is a Saturday" -statusline
endif

// Sunday ?
if V[day_of_week=-1]
  Message "E: &V[mydate] is a Sunday" -statusline
endif
 

Components
InputAssistant