A reference document listing built-in convenience functions to support data transformation in expressions for dates.
Transforms a Date to the start of the given time period. Returns either a JavaScript Date or Luxon Date, depending on input.
Function parameters
unit (OPTIONAL, STRING ENUM): A valid string specifying the time unit.
Default: week
One of: second, minute, hour, day, week, month, year
Transforms a Date to the end of the month.
Extracts the part defined in datePart from a Date. Returns either a JavaScript Date or Luxon Date, depending on input.
Function parameters
datePart(OPTIONAL, STRING ENUM): A valid string specifying the time unit.Default:
weekOne of:
second,minute,hour,day,week,month,year
Formats a Date in the given structure.
Function parameters
fmt(REQUIRED, STRING ENUM):: A valid string specifying the time format. Refer to Luxon | Table of tokens for formats.
Checks if a Date is between two given dates.
Function parameters
date1(REQUIRED, DATE OR DATETIME): The first date in the range.date2(REQUIRED, DATE OR DATETIME): The last date in the range.
Checks if a Date is within Daylight Savings Time.
Checks if a Date is within a given time period.
Function parameters
n(OPTIONAL, NUMBER): The number of units. For example, to check if the date is in the last nine weeks, enter 9.Default:
0unit(OPTIONAL, STRING ENUM): A valid string specifying the time unit.Default:
minutesOne of:
second,minute,hour,day,week,month,year
Checks if the Date falls on a Saturday or Sunday.
Subtracts a given time period from a Date. Returns either a JavaScript Date or Luxon Date, depending on input.
Function parameters
n(REQUIRED, NUMBER): The number of units. For example, to subtract nine seconds, enter 9 here.unit(OPTIONAL, STRING ENUM): A valid string specifying the time unit.Default:
millisecondsOne of:
second,minute,hour,day,week,month,year
Adds a given time period to a Date. Returns either a JavaScript Date or Luxon Date, depending on input.
Function parameters
n(REQUIRED, NUMBER): The number of units. For example, to add nine seconds, enter 9 here.unit(OPTIONAL, STRING ENUM): A valid string specifying the time unit.Default:
millisecondsOne of:
second,minute,hour,day,week,month,year
Converts a JavaScript date to a Luxon date object.