Namespace: Albatross.Expression.Prefix
Prefix expression that finds the next weekday (Monday-Friday) from a given date. Takes 1-2 parameters: the starting date and optional number of weekdays to advance (defaults to 1).
public class NextWeekDay : PrefixExpression, Albatross.Expression.Nodes.IPrefixExpression, Albatross.Expression.Nodes.IExpression, Albatross.Expression.Nodes.IToken
Inheritance Object → PrefixExpression → NextWeekDay
Implements IPrefixExpression, IExpression, IToken
The name of the prefix function.
public string Name { get; }
The token representation, which is the same as the Name.
public string Token { get; }
The minimum number of operands this function requires.
public int MinOperandCount { get; }
The maximum number of operands this function accepts.
public int MaxOperandCount { get; }
The list of operand expressions passed to this function.
public IReadOnlyList<IExpression> Operands { get; set; }
Initializes a new instance of the NextWeekDay class with name “NextWeekDay” and 1-2 parameters.
public NextWeekDay()
Finds the next weekday by advancing the specified number of weekdays from the given date. Skips weekends (Saturday and Sunday) and returns the next business day.
protected object Run(List<object> operands)
operands
List<Object>
List containing 1-2 operands: starting date and optional weekday count (defaults to 1).
Object
A DateTime representing the next weekday after advancing the specified count.
!:FormatException
Thrown when operands cannot be converted to appropriate types.