Class DayOfWeek
- Namespace
- Albatross.Expression.Prefix
- Assembly
- Albatross.Expression.dll
Prefix expression that extracts the day of the week from a DateTime value. Returns a numeric value representing the day (0=Sunday, 1=Monday, etc.).
public class DayOfWeek : PrefixExpression, IPrefixExpression, IExpression, IToken
- Inheritance
-
DayOfWeek
- Implements
- Inherited Members
- Extension Methods
Constructors
DayOfWeek()
Initializes a new instance of the DayOfWeek class with name "DayOfWeek" and exactly one parameter.
public DayOfWeek()
Methods
Run(List<object>)
Extracts the day of the week from the provided DateTime operand. Converts the DayOfWeek enum value to a double (0=Sunday, 1=Monday, 2=Tuesday, etc.).
protected override object Run(List<object> operands)
Parameters
Returns
- object
A double representing the day of the week (0-6, where 0 is Sunday).
Exceptions
- FormatException
Thrown when the operand cannot be converted to DateTime.