Class Month
- Namespace
- Albatross.Expression.Prefix
- Assembly
- Albatross.Expression.dll
Prefix expression that extracts the month component from a DateTime value. Returns an integer representing the month (1-12).
public class Month : PrefixExpression, IPrefixExpression, IExpression, IToken
- Inheritance
-
Month
- Implements
- Inherited Members
- Extension Methods
Constructors
Month()
Initializes a new instance of the Month class with name "Month" and exactly one parameter.
public Month()
Methods
Run(List<object>)
Extracts the month component from the provided DateTime operand.
protected override object Run(List<object> operands)
Parameters
Returns
- object
An integer representing the month (1 for January, 12 for December).
Exceptions
- FormatException
Thrown when the operand cannot be converted to DateTime.