The array $sdays provides quick access with index $n for up to 1500 days into the future. Create a default value for field ‘sdays2’ in menu Settings, Field Validation with the number of days in advance needed (numeric default value).
Example:
$sdays[$n] == ‘M’