expression

< Back


UnixTimestamp

Namespace: Albatross.Expression.Prefix

Prefix operation that convert a DateTime to the number of seconds that have elapsed since 1970-01-01T00:00:00Z. It is also called unix timestamp. If the input is not DateTime, the operand is converted to text first and parsed to a datetime object

Operand Count: 1

    • input : any

Output Type: long

public class UnixTimestamp : PrefixExpression, Albatross.Expression.Nodes.IPrefixExpression, Albatross.Expression.Nodes.IExpression, Albatross.Expression.Nodes.IToken

Inheritance ObjectPrefixExpressionUnixTimestamp
Implements IPrefixExpression, IExpression, IToken

Properties

Name

The name of the prefix function.

public string Name { get; }

Property Value

String

Token

The token representation, which is the same as the Name.

public string Token { get; }

Property Value

String

MinOperandCount

The minimum number of operands this function requires.

public int MinOperandCount { get; }

Property Value

Int32

MaxOperandCount

The maximum number of operands this function accepts.

public int MaxOperandCount { get; }

Property Value

Int32

Operands

The list of operand expressions passed to this function.

public IReadOnlyList<IExpression> Operands { get; set; }

Property Value

IReadOnlyList<IExpression>

Constructors

UnixTimestamp()

public UnixTimestamp()

Methods

Run(List<Object>)

protected object Run(List<object> operands)

Parameters

operands List<Object>

Returns

Object


< Back