Skip to content

Flxble.Templating: Builtins

cannorin edited this page Jan 15, 2019 · 2 revisions

Toplevel operators/functions

Equality operators: =, <>

Comparison operators: >, <, >=, <=

Null-checking functions: is_null, is_not_null

Default value operator: ?|

Logical operators/functions: &&, ||, not

Addition operator: +

Subtraction operator: -

Negation operator: neg

Math operators/functions: *. /, ^, %, abs, ceil, floor, round, sqrt, root

Type checking & conversion functions: string, int, float, typeof

Pipeline operators: |>, ||>, <|, <||

Function composition operators: >>, <<

Identity function: id

string module

array module

record module

date module

date.new : Record -> Date

Creates a new Date value.

def d = date.new {
  year = 2019,
  month = 1,
  day = 1,
  hour = 12,
  minute = 34,
  second = 56,
  millisecond = 789
}

The fields year, month, and day are required. The other fields are optional and will be 0 if omitted.

timespan module

timespan.new : Record -> TimeSpan

def t = timespan.new {
  day = 1,
  hour = 23,
  minute = 45,
  second = 6,
  millisecond = 789
}

All the fields are optional and will be 0 if omitted.

path module

debug module