Carrot reference
...
Fields
Data Types
Relative Dates
many functions in carrot (cql) that accept dates, such as the date() docid\ grpuvycy4wi6wm7kuq4bv function, will accept relative dates, a way of expressing date math relative dates are expressed as a string of operations, like +3d (add three days), or fiscalyearstart+2q 1q (starting from the beginning of the fiscal year, add two quarters and subtract one day) operations are always expressed as + or followed by a number, followed by one of the following d for days w for weeks m for months (will preserve end of month if the starting point is also eom) q for quarters (will preserve end of month if the starting point is also eom) y for years for example, +3w means ("plus three weeks") relative dates can start with a starting point if omitted, the starting point will be the current date for example, +3m means ("three months from the current date") but monthstart+3m means ("three months from the start of the month of the current date") valid starting points are today always returns today's date fiscalyearstart fiscalquarterstart yearstart quarterstart monthstart weekstart fiscalyearend fiscalquarterend yearend quarterend monthend weekend examples date("+1m") one month from the current date date(" 30d", "2025 01 31") returns 2025 01 01 date("+1m 1d") one month, minus one day, from the current date date(" 1y+1d") subtract one year, but add one day, to the current date date("today+1m") one month from today (equivalent to date("+1m", today) ) date("fiscalyearstart+2q") two quarters from the start of the fiscal year of the current date date("yearstart+2q") two quarters from the start of the calendar year of the current date