Class NextWeekDay
- Namespace
- Albatross.Expression.Prefix
- Assembly
- Albatross.Expression.dll
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, IPrefixExpression, IExpression, IToken
- Inheritance
-
NextWeekDay
- Implements
- Inherited Members
- Extension Methods
Constructors
NextWeekDay()
Initializes a new instance of the NextWeekDay class with name "NextWeekDay" and 1-2 parameters.
public NextWeekDay()
Methods
Run(List<object>)
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 override object Run(List<object> operands)
Parameters
operandsList<object>List containing 1-2 operands: starting date and optional weekday count (defaults to 1).
Returns
- object
A DateTime representing the next weekday after advancing the specified count.
Exceptions
- FormatException
Thrown when operands cannot be converted to appropriate types.