String
concat
join
slice
format
replace
replaceAll
formatDate
Boolean
contains
test
empty
Date
start
end
now
fromtTimestamp
dateAdd
dateSubtract
Number
length
toNumber
abs
cbrt
ceil
exp
floor
ln
log10
log2
max
min
round
sign
sqrt
timestamp
dateBetween
minute
hour
day
date
month
year
Operators
if
add
subtract
multiply
divide
pow
mod
unaryMinus
unaryPlus
not
and
or
equal
unequal
larger
largerEq
smaller
smallerEq
Constants
e
pi
true
false
Name of Function( )
-Notion's description of function.
Explanation
- Requires: # of
Arguments
- Type of
Argument
- Type of
Argument
- Returns: Type of returned
Value
Syntax
Possible variances of the function
Examples
a function example and operator example if applicable.
concat( )
-Concatenates its arguments and returns the result.
Explanation
Strings
together.- Requires: 2+
Arguments
- 2+
Strings
- Returns:
String
Syntax
concat(text...)
Examples
"dog" +"go" == "doggo"
concat("dog", "go") == "doggo"
join( )
-Inserts the first argument between the rest and returns their concatenation.
Explanation
- Requires: 3+
Arguments
- 1 Delimiter
String
- 2+
Strings
- Returns:
String
Syntax
join(text...)
Examples
join("-", "a", "b", "c") == "a-b-c"
slice( )
-Extracts a substring from a string from the start index (inclusively) to the end index (optional and exclusively).
Explanation
- Requires:
- Returns:
Syntax
slice(text, number)
slice(text, number, number)
Examples
slice("Hello world", 1, 5) == "ello"
slice("notion", 3) == "ion"
length( )
-Returns the length of a string.
Explanation
- Requires: 1
Argument
- 1
String
- Returns:
Number
Syntax
length(text)
Examples
length("Hello world") == 11
format( )
-Formats its argument as a string.
Explanation
- Requires: 1
Argument
- 1
Number
,Date
, orBoolean
- Returns:
String
Syntax
format(value)
Examples
format(42) == "42"
format(true) == "true"
format(now()) == "Wed Dec 31 1969 16:00:00 GMT-0800 (PST)"
toNumber( )
-Parses a number from text.
Explanation
- Requires:
- 1
String
,Number
,Boolean
, orDate
- Returns:
Number
Syntax
toNumber(text)
toNumber(number)
toNumber(boolean)
toNumber(date)
Examples
toNumber("42") == 42
toNumber(false) == 0
contains( )
-Returns true if the second argument is found in the first.
Explanation
- Requires: 2
Arguments
- 1
String
to search from - 1
String
to search for - Returns:
Boolean
Syntax
contains(text, text)
Examples
contains("notion", "ion") == true
replace( )
-Replaces the first match of a regular expression with a new value.
Explanation
- Requires: 3
Arguments
- 1
Number
,String
, orBoolean
- 1
Regular Expression
(wikipedia) - 1 Replacement
String
- Returns:
String
Syntax
replace(number, text, text)
replace(text, text, text)
replace(boolean, text, text)
Examples
replace("1-2-3", "-", "!") == "1!2-3"
replaceAll( )
-Replaces all matches of a regular expression with a new value.
Explanation
- Requires: 3
Arguments
- 1
Number
,String
, orBoolean
- 1
Regular Expression
(wikipedia) - 1 Replacement
String
- Returns:
String
Syntax
replaceAll(number, text, text)
replaceAll(text, text, text)
replaceAll(boolean, text, text)
Examples
replaceAll("1-2-3", "-", "!") == "1!2!3"
test( )
-Tests if a string matches a regular expression.
Explanation
- Requires: 2
Arguments
- 1
Number
,String
, orBoolean
- 1
Regular Expression
(wikipedia) - Returns:
Boolean
Syntax
test(number, text)
test(text, text)
test(boolean, text)
Examples
test("1-2-3", "-") == true
empty( )
-Tests if a value is empty.
Explanation
- Requires: 1
Argument
- 1
Number
,String
,Boolean
, orDate
- Returns:
Boolean
Syntax
empty(number)
empty(text)
empty(boolean)
empty(date)
Examples
empty("") == true
abs( )
-Returns the absolute value of a number.
Explanation
- Requires: 1
Argument
- 1
Number
- Returns:
Number
Syntax
abs(number)
Examples
abs(-3) == 3
cbrt( )
-Returns the cube root of a number.
Explanation
- Requires: 1
Argument
- 1
Number
- Returns:
Number
Syntax
cbrt(number)
Examples
cbrt(8) == 2
ceil( )
-Returns the smallest integer greater than or equal to a number.
Explanation
- Requires: 1
Argument
- 1
Number
- Returns:
Number
Syntax
ceil(number)
Examples
ceil(4.2) == 5
exp( )
-Returns E^x, where x is the argument, and E is Euler's constant (2.718…), the base of the natural logarithm.
Explanation
- Requires: 1
Argument
- 1
Number
- Returns:
Number
Syntax
exp(number)
Examples
exp(1) == 2.718281828459045
floor( )
-Returns the largest integer less than or equal to a number.
Explanation
- Requires: 1
Argument
- 1
Number
- Returns:
Number
Syntax
floor(number)
Examples
floor(2.8) == 2
ln( )
-Returns the natural logarithm of a number.
Explanation
- Requires: 1
Argument
- 1
Number
- Returns:
Number
Syntax
ln(number)
Examples
ln(e) == 1
log10( )
-Returns the base 10 logarithm of a number.
Explanation
- Requires: 1
Argument
- 1
Number
- Returns:
Number
Syntax
log10(number)
Examples
log10(1000) == 3
log2( )
-Returns the base 2 logarithm of a number.
Explanation
- Requires: 1
Argument
- 1
Number
- Returns:
Number
Syntax
log2(number)
Examples
log2(64) == 6
max( )
-Returns the largest of zero or more numbers.
Explanation
- Requires: 1+
Argument
- 1+
Number
- Returns:
Number
Syntax
max(number...)
Examples
max(5, 2, 9, 3) == 9
min( )
-Returns the smallest of zero or more numbers.
Explanation
- Requires: 1+
Argument
- 1+
Number
- Returns:
Number
Syntax
min(number...)
Examples
min(4, 1, 5, 3) == 1
round( )
-Returns the value of a number rounded to the nearest integer.
Explanation
- Requires: 1
Argument
- 1
Number
- Returns:
Number
Syntax
round(number)
Examples
round(4.4) == 4
round(4.5) == 5
sign( )
-Returns the sign of the x, indicating whether x is positive, negative or zero.
Explanation
- Requires: 1
Argument
- 1
Number
- Returns:
Number
Syntax
sign(number)
Examples
sign(4) == 1
sign(-9) == -1
sign(0) == 0
sqrt( )
-Returns the positive square root of a number.
Explanation
- Requires: 1
Argument
- 1
Number
- Returns:
Number
Syntax
sqrt(number)
Examples
sqrt(144) == 12
start( )
-Returns the start of a date range.
Explanation
- Requires: 1
Argument
- 1
Date
- Returns:
Date
Syntax
start(date)
Examples
start(prop("Date")) == Feb 2, 1996
Syntax | Date | Return |
---|---|---|
start(prop("Date")) | June 22, 2021 | June 22, 2021 12:00 AM2023-03-26T21:56:18+00:00 |
start(prop("Date")) | June 22, 2021 → June 26, 2021 | June 22, 2021 12:00 AM2023-03-26T21:56:18+00:00 |
start(prop("Date")) | June 22, 2021 1:00 PM (CDT) → June 26, 2021 5:00 PM (CDT) | June 22, 2021 1:00 PM2023-03-26T21:56:18+00:00 |
end( )
-Returns the end of a date range.
Explanation
- Requires: 1
Argument
- 1
Date
- Returns:
Date
Syntax
end(date)
Examples
end(prop("Date")) == Feb 2, 1996
Syntax | Date | Return |
---|---|---|
end(prop("Date")) | June 22, 2021 → June 23, 2021 | June 23, 2021 12:00 AM2023-03-26T21:56:18+00:00 |
now( )
-Returns the current date and time.
Explanation
- Requires: 0
Arguments
- Time exists
- Returns:
Date
Syntax
now()
Examples
now() == Feb 2, 1996
timestamp( )
-Returns an integer number from a Unix millisecond timestamp, corresponding to the number of milliseconds since January 1, 1970.
Explanation
- Requires: 1
Argument
- 1
Date
- Returns:
Number
Syntax
timestamp(date)
Examples
timestamp(now()) == 1512593154718
fromTimestamp
-Returns a date constructed from a Unix millisecond timestamp, corresponding to the number of milliseconds since January 1, 1970.
Explanation
- Requires: 1
Argument
- 1
Number
- Returns:
Date
Syntax
fromTimestamp(number)
Examples
fromTimestamp(2000000000000) == Tue May 17 2033
dateAdd
-Add to a date. The last argument, unit, can be one of: "years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds", or "milliseconds".
Explanation
- Requires: 3
Arguments
- 1
Date
- 1
Number
- 1
String
- Returns:
Date
Syntax
dateAdd(date, number, text)
Examples
dateAdd(date, amount, "years")
dateAdd(date, amount, "quarters")
dateAdd(date, amount, "months")
dateAdd(date, amount, "weeks")
dateAdd(date, amount, "days")
dateAdd(date, amount, "hours")
dateAdd(date, amount, "minutes")
dateAdd(date, amount, "seconds")
dateAdd(date, amount, "milliseconds")
Syntax | Date | Return |
---|---|---|
dateAdd(prop("Date"), 10, "years") | June 22, 2021 | June 22, 2031 12:00 AM2023-03-26T21:56:18+00:00 |
dateSubtract( )
-Subtract from a date. The last argument, unit, can be one of: "years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds", or "milliseconds".
Explanation
- Requires: 3
Arguments
- 1
Date
- 1
Number
String
- Returns:
Date
Syntax
dateSubtract(date, number, text)
Examples
dateSubtract(date, amount, "years")
dateSubtract(date, amount, "quarters")
dateSubtract(date, amount, "months")
dateSubtract(date, amount, "weeks")
dateSubtract(date, amount, "days")
dateSubtract(date, amount, "hours")
dateSubtract(date, amount, "minutes")
dateSubtract(date, amount, "seconds")
dateSubtract(date, amount, "milliseconds")
Syntax | Date | Return |
---|---|---|
dateSubtract(prop("Date"), 10, "years") | June 22, 2021 | June 22, 2011 12:00 AM2023-03-26T21:56:18+00:00 |
dateBetween( )
-Returns the time between two dates. The last argument, unit, can be one of: "years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds", or "milliseconds".
Explanation
- Requires: 3
Arguments
- 2
Dates
- 1
String
- Returns:
Number
Syntax
dateBetween(date, date, text)
Examples
dateBetween(date, date2, "years")
dateBetween(date, date2, "quarters")
dateBetween(date, date2, "months")
dateBetween(date, date2, "weeks")
dateBetween(date, date2, "days")
dateBetween(date, date2, "hours")
dateBetween(date, date2, "minutes")
dateBetween(date, date2, "seconds")
dateBetween(date, date2, "milliseconds")
Syntax | Date 1 | Date 2 | Return |
---|---|---|---|
dateBetween(prop("Date 2"), prop("Date 1"), "minutes") | June 22, 2021 | June 22, 2022 | 525600 |
formatDate( )
-Format a date using the Moment standard time format string.
Explanation
- Requires: 2
Arguments
- 1
Date
- 1
String
- Returns:
String
Syntax
formatDate(date, text)
Examples
formatDate(now(), "MMMM D YYYY, HH:mm") == March 30 2010, 12:00
formatDate(now(), "YYYY/MM/DD, HH:mm") == 2010/03/30, 12:00
formatDate(now(), "MM/DD/YYYY, HH:mm") == 03/30/2010, 12:00
formatDate(now(), "HH:mm A") == 12:00 PM
formatDate(now(), "M/D/YY") == 3/30/10
Syntax | Date | Return |
---|---|---|
formatDate(prop("Date"), "MMMM D YYYY, HH:mm") | June 22, 2021 | June 22 2021, 00:00 |
minute( )
-Returns an integer number, between 0 and 59, corresponding to minutes in the given date.
Explanation
- Requires: 1
Argument
- 1
Date
- Returns:
Number
Syntax
minute(date)
Examples
minute(now()) == 45
hour( )
-Returns an integer number, between 0 and 23, corresponding to hour for the given date.
Explanation
- Requires: 1
Argument
- 1
Date
- Returns:
Number
Syntax
hour(date)
Examples
hour(now()) == 17
day( )
-Returns an integer number corresponding to the day of the week for the given date: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.
Explanation
- Requires: 1
Argument
- 1
Date
- Returns:
Number
Syntax
day(date)
Examples
day(now()) == 3
date( )
-Returns an integer number, between 1 and 31, corresponding to day of the month for the given.
Explanation
- Requires: 1
Argument
- 1
Date
- Returns:
Number
Syntax
date(date)
Examples
date(now()) == 13
month( )
-Returns an integer number, between 0 and 11, corresponding to month in the given date according to local time. 0 corresponds to January, 1 to February, and so on.
Explanation
- Requires: 1
Argument
- 1
Date
- Returns:
Number
Syntax
month(date)
Examples
month(now()) == 11
year( )
-Returns a number corresponding to the year of the given date.
Explanation
- Requires: 1
Argument
- 1
Date
- Returns:
Number
Syntax
year(date)
Examples
year(now()) == 1984
if( )
-Switches between two options based on another value.
Explanation
- Requires: 3
Arguments
- 1
Boolean
- 2
Values
- Returns:
Value
Syntax
boolean ? value : value
if(boolean, value, value)
Examples
true ? 1 : -1 == 1
if(false, "yes", "no") == "no"
add( )
-Adds two numbers and returns their sum, or concatenates two strings.
Explanation
- Requires: 2
Arguments
- 2
Numbers
OR - 2
Strings
- Returns:
Number
ORString
Syntax
number + number
text + text
add(number, number)
add(text, text)
Examples
3 + 4 = 7
add(1, 3) == 4
"add" + "text" == "addtext"
Syntax | Return | Function Return | Operator Return | Operator/Function |
---|---|---|---|---|
add(1, 1) | 2 | 2 | 6 | Function |
1 + 5 | 6 | 2 | 6 | Operator |
subtract( )
-Subtracts two numbers and returns their difference.
Explanation
- Requires:
- Returns:
Syntax
number - number
subtract(number, number)
Examples
3 - 1 == 2
subtract(4, 5) == -1
multiply( )
-Multiplies two numbers and returns their product.
Explanation
- Requires:
- Returns:
Syntax
number * number
multiply(number, number)
Examples
6 * 9 == 54
multiply(2, 10) == 20
divide( )
-Divides two numbers and returns their quotient.
Explanation
- Requires:
- Returns:
Syntax
number / number
divide(number, number)
Examples
12 / 4 == 3
divide(12, 3) == 4
pow( )
-Returns base to the exponent power, that is, baseexponent.
Explanation
- Requires:
- Returns:
Syntax
number ^ number
pow(number, number)
Examples
5 ^ 3 == 125
pow(2, 6) == 64
mod( )
-Divides two numbers and returns their remainder.
Explanation
- Requires:
- Returns:
Syntax
number % number
mod(number, number)
Examples
7 % 5 == 2
mod(3, 3) == 0
unaryMinus( )
-Negates a number.
Explanation
- Requires:
- Returns:
Syntax
- number
unaryMinus(number)
Examples
-1 + 2 == 1
unaryMinus(42) == -42
unaryPlus( )
-Converts its argument into a number.
Explanation
- Requires:
- Returns:
Syntax
+ value
unaryPlus(value)
Examples
+ "42" == 42
unaryPlus(true) == 1
not( )
-Returns the logical NOT of its argument.
Explanation
- Requires:
- Returns:
Syntax
not boolean
not(boolean)
Examples
not true == false
not(false) == true
and( )
-Returns the logical AND of its two arguments.
Explanation
- Requires:
- Returns:
Syntax
boolean and boolean
and(boolean, boolean)
Examples
true and false == false
and(true, true) == true
or( )
-Returns the logical OR of its two arguments.
Explanation
- Requires:
- Returns:
Syntax
boolean or boolean
or(boolean, boolean)
Examples
false or true == true
or(false, false) == false
equal( )
-Returns true if its arguments are equal, and false otherwise.
Explanation
- Requires:
- Returns:
Syntax
value == value
equal(value, value)
Examples
(3 * 5 == 15) == true
equal(false, not true) == true
unequal( )
-Returns false if its arguments are equal, and true otherwise.
Explanation
- Requires:
- Returns:
Syntax
value != value
unequal(value, value)
Examples
(6 * 9 != 42) == false
(true != not false) == false
larger( )
-Returns true if the first argument is larger than the second.
Explanation
- Requires:
- Returns:
Syntax
text > text
boolean > boolean
date > date
number > number
larger(text, text)
larger(boolean, boolean)
larger(date, date)
larger(number, number)
Examples
5 > 3 == true
largerEq( )
-Returns true if the first argument is larger than or equal to than the second.
Explanation
- Requires:
- Returns:
Syntax
text >= text
boolean >= boolean
date >= date
number >= number
largerEq(text, text)
largerEq(boolean, boolean)
largerEq(date, date)
largerEq(number, number)
Examples
5 >= 3 == true
4 >= 4 == true
smaller( )
-Returns true if the first argument is smaller than the second.
Explanation
- Requires:
- Returns:
Syntax
text < text
boolean < boolean
date < date
number < number
smaller(text, text)
smaller(boolean, boolean)
smaller(date, date)
smaller(number, number)
Examples
10 < 8 == false
smallerEq( )
-Returns true if the first argument is smaller than or equal to than the second.
Explanation
- Requires:
- Returns:
Syntax
text <= text
boolean <= boolean
date <= date
number <= number
smallerEq(text, text)
smallerEq(boolean, boolean)
smallerEq(date, date)
smallerEq(number, number)
Examples
10 <= 8 == false
8 <= 8 == true
e
-The base of the natural logarithm.
Explanation
- Requires:
- Returns:
Syntax
e
Examples
e == 2.718281828459045
pi
-The ratio of a circle's circumference to its diameter.
Explanation
- Requires:
- Returns:
Syntax
pi
Examples
2 * pi == 6.283185307179586
true
-
Explanation
- Requires:
- Returns:
Syntax
true
Examples
true ? "yes" : "no" == "yes"
false
-
Explanation
- Requires:
- Returns:
Syntax
false
Examples
false ? "yes" : "no" == "no"