@DAYS — subtracts one date from another, and returns the difference in days. Both input dates may be in any input date format supported by this plugin. Both must be valid dates, and both must fall within the supported date range.

Syntax:
%@DAYS[startdate,enddate,infmt,mode]

startdate, enddatethe dates to subtract
infmtthe input date format, used to interpret ambiguous dates
mode0 for the difference, 1 for the size of the (inclusive) range; defaults to 0

When mode is 0 or not specified, startdate is subtracted from enddate. If startdate is later than enddate, the result will be negative. If both refer to the same date, the result will be zero.

When mode is 1, the earlier date is subtracted from the later, and one added to the difference. The result will always be positive; if startdate and enddate refer to the same date, the result will be 1.

You can use this function to calculate the number of days until some future event by specifying T for the startdate:

echo Only %@days[T,%@nextdate[12,25]] days until Christmas!
echo %@days[T,%@easter[*]] days until Easter.

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