@INLIEU — Substitutes a weekday for a weekend date. The date may be in any input date format supported by this plugin; it must be a valid date within the supported range.

Syntax:
%@INLIEU[date,fmt,mode,flags]

datethe date to check; defaults to today
fmtthe date format used to return the resulting date, and also to interpret ambiguous input dates; defaults to 256
mode0 = nearest, 1 = previous Friday, 2 = following Monday, 3 = Sunday (only) to Monday; defaults to 0
flags1: return an empty string if no substitution is made; used internally by QCAL

If the input date is a weekday, no substitution will be made.

In mode 0 (the default), if the date falls on a Saturday, the previous Friday will be returned; if it is a Sunday, the following Monday will be returned. In mode 1, either a Saturday or a Sunday input date will return the previous Friday; in mode 2, either a Saturday or a Sunday input date will return the following Monday. In mode 3, Sundays will be remapped to the following Monday, but Saturdays are returned unchanged.

As of version 1.3.10, @INLIEU adds two new modes to support some floating Chilean holidays:

4if date is a Tuesday, Wednesday, or Thursday, return the preceding Monday; if it’s a Friday, return the following Monday; otherwise, return the original date
5if date is a Tuesday, return the preceding Friday; if it’s a Wednesday, return the following Friday; otherwise just return date

• New: This function does not exist in Take Command.