Create a new instance.
Absolute date to use when evaluating the query dates of "absolute" type.
Integer number of days to when evaluating query dates of "relative". This value can be negative. For example, a "relative" type with "-3" days, will always evaluated to 3 days ago when the query is run.
The date field to use when querying
The type of date range. "relative" dates use the days
property to add days to the current date when evaluating a query. "absolute" type query dates use the date
property for a specific day.
Create a new instance.
Generated using TypeDoc
QueryDate
Represents a dynamic date for use in queries.
QueryDate
is used when configuring Workspace objectsstartDate
andendDate
properties.QueryDates always specify a date with time components being ignored. If used a the start of a query range, the time will be moved to the beginning of that day. If used at the end of a query range, time will be moved to the end of that day.
Example: Create Workspace with date range
// create a workspace let workspace = new Workspace(); // create a QueryDate for three days ago let start = new QueryDate(); start.field = "created" start.type = "relative" start.days = -3; // create a QueryDate for specific date let qDate = new QueryDate(); qDate.field = "modified" qDate.type = "absolute" qDate.date = Date.today(); // assign to the workspace and apply workspace.startDate = start; // .endDate also available app.applyWorkspace(workspace);