Skip to content

Fiscal Date Filters

Fiscal filters answer business-calendar questions such as “orders in this fiscal quarter” or “events in the previous fiscal year.” Configure the first day of the fiscal year once, then use dynamic operators that move forward with the current date.

Source code
TypeScriptts
const today = new Date();
const currentYear = today.getUTCFullYear();
const fiscalStartYear = today.getUTCMonth() >= 1 ? currentYear : currentYear - 1;

grid.plugins = [AdvanceFilterPlugin];
grid.columns = [
  { prop: 'period', name: 'Period' },
  {
    prop: 'accountingDate',
    name: 'Accounting date',
    filter: [FILTER_DATE],
  },
];
grid.filter = {
  date: {
    timezoneMode: 'utc',
    fiscalYearStart: { month: 2, day: 1 },
    operators: ['thisFiscalQuarter', 'thisFiscalYear', 'previousFiscalYear'],
  },
};

return [
  { period: 'Before fiscal year', accountingDate: `${fiscalStartYear}-01-31` },
  { period: 'Fiscal year opens', accountingDate: `${fiscalStartYear}-02-01` },
  { period: 'Midyear review', accountingDate: `${fiscalStartYear}-08-01` },
  { period: 'Fiscal year closes', accountingDate: `${fiscalStartYear + 1}-01-31` },
  { period: 'Next fiscal year', accountingDate: `${fiscalStartYear + 1}-02-01` },
];

For example, with a fiscal year beginning on February 1, September 3, 2026 belongs to:

  • the fiscal year from February 1, 2026 through January 31, 2027;
  • the fiscal quarter from August 1 through October 31, 2026.

Calendar operators do not change meaning. “This quarter” in the Date or Datetime filter still uses January, April, July, and October boundaries; “This fiscal quarter” uses the configured fiscal calendar.

month is one-based. The start must be a real calendar date that occurs every year, so February 29 is not accepted.

import { AdvanceFilterPlugin } from '@revolist/revogrid-pro';
import '@revolist/revogrid-pro/dist/revogrid-pro.css';
grid.plugins = [AdvanceFilterPlugin];
grid.columns = [
{ prop: 'accountingDate', name: 'Accounting date', filter: 'date' },
{ prop: 'postedAt', name: 'Posted at', filter: 'datetime' },
];
grid.filter = {
date: {
fiscalYearStart: { month: 2, day: 1 },
timezoneMode: 'organization',
organizationTimeZone: 'Europe/Lisbon',
},
};

Once fiscalYearStart is configured, Date and Datetime menus include all six fiscal operators by default. The timezone decides which civil date is “today” when the period is resolved.

FilterFiscal behavior
Date FilterSupports This, Previous, and Next fiscal quarter and fiscal year.
Datetime FilterSupports the same periods for exact instants, resolved in the column timezone. Saved IDs use the datetime prefix.
Relative WindowthisQuarter, yearToDate, and non-rolling custom quarter/year windows align to fiscalYearStart.
Filter ExpressionsSupports phrases such as this fiscal quarter and previous fiscal year on date-aware columns.
Date range filterDoes not create fiscal periods automatically; users can select the fiscal boundary dates explicitly.
Timeline BrushSupports an opt-in fiscalYear mode that groups source values at the configured fiscal-year boundary.
Time MatrixDoes not use fiscal periods; it filters weekday and hour combinations.

fiscalYearStart is shared date policy, but only controls that define aligned quarter or year semantics consume it.

Add fiscalYear to the Timeline Brush’s enabled granularities to show fiscal-year bins. The mode uses the effective fiscalYearStart for the column, so a February 1 anchor produces bins from February 1 through January 31. It is opt-in to avoid duplicating the ordinary calendar-year mode.

import {
FILTER_TIMELINE_BRUSH,
createTimelineBrushStructuredFilterType,
} from '@revolist/revogrid-pro';
grid.columns = [
{
prop: 'accountingDate',
name: 'Accounting date',
filter: ['date', FILTER_TIMELINE_BRUSH],
},
];
grid.filter = {
date: {
fiscalYearStart: { month: 2, day: 1 },
},
structuredFilterTypes: [
createTimelineBrushStructuredFilterType({
granularity: 'fiscalYear',
granularities: ['year', 'fiscalYear'],
}),
],
};

Use format when you want fiscal-specific labels such as FY 2026; the formatter receives the resolved fiscal-year start in its context.

Use date.operators as an ordered allowlist. The same unprefixed IDs configure both Date and Datetime menus; Datetime maps them to its prefixed saved IDs internally.

grid.filter = {
date: {
fiscalYearStart: { month: 2, day: 1 },
operators: [
'thisFiscalQuarter',
'previousFiscalQuarter',
'nextFiscalQuarter',
'thisFiscalYear',
'previousFiscalYear',
'nextFiscalYear',
],
},
};
Menu labelDate saved IDDatetime saved ID
This fiscal quarterthisFiscalQuarterdatetimeThisFiscalQuarter
Previous fiscal quarterpreviousFiscalQuarterdatetimePreviousFiscalQuarter
Next fiscal quarternextFiscalQuarterdatetimeNextFiscalQuarter
This fiscal yearthisFiscalYeardatetimeThisFiscalYear
Previous fiscal yearpreviousFiscalYeardatetimePreviousFiscalYear
Next fiscal yearnextFiscalYeardatetimeNextFiscalYear

These operators need no value. They are resolved from the captured reference instant, timezone, and fiscal-year start every time filtering runs.

Put exceptions in date.columns. A column inherits the grid policy, then applies its partial override. A column-level operators array replaces the global list for that field.

grid.filter = {
date: {
fiscalYearStart: { month: 1, day: 1 },
operators: ['thisFiscalQuarter', 'thisFiscalYear'],
columns: {
accountingDate: {
fiscalYearStart: { month: 2, day: 1 },
operators: ['thisFiscalQuarter', 'previousFiscalQuarter'],
},
subscriptionDate: {
fiscalYearStart: { month: 7, day: 1 },
operators: ['thisFiscalYear', 'previousFiscalYear'],
},
},
},
};

This is useful when subsidiaries, products, or reporting columns follow different calendars.

Date and Datetime fiscal conditions are value-free:

grid.filter = {
date: {
fiscalYearStart: { month: 2, day: 1 },
},
multiFilterItems: {
accountingDate: [
{
id: 1,
type: 'thisFiscalQuarter',
relation: 'and',
},
],
postedAt: [
{
id: 2,
type: 'datetimePreviousFiscalYear',
relation: 'and',
},
],
},
};

The canonical Filter AST uses the unprefixed operator with the field’s temporal value type:

{
type: 'condition',
field: 'accountingDate',
operator: 'thisFiscalQuarter',
valueType: 'date',
}

Do not save resolved start and end dates for these operators. Keeping the relative operator makes a saved view advance into the next fiscal period automatically.

Relative Window uses the fiscal calendar for its quarter and year alignment:

import {
FILTER_RELATIVE_WINDOW,
createRelativeWindowStructuredFilterType,
} from '@revolist/revogrid-pro';
grid.columns = [
{
prop: 'dueDate',
name: 'Due date',
filter: ['date', FILTER_RELATIVE_WINDOW],
},
];
grid.filter = {
date: {
fiscalYearStart: { month: 2, day: 1 },
},
structuredFilterTypes: [
createRelativeWindowStructuredFilterType({
presets: ['thisQuarter', 'yearToDate'],
customWindow: {
units: ['quarter', 'year'],
showRolling: false,
defaultValue: {
direction: 'last',
amount: 1,
unit: 'quarter',
rolling: false,
},
},
}),
],
};
  • thisQuarter resolves the current fiscal quarter.
  • yearToDate begins at the current fiscal-year start.
  • A custom quarter or year with rolling: false follows complete fiscal periods.
  • With rolling: true, the window is a duration from today and fiscal boundaries do not affect it.

Relative Window saves a versioned expression such as { version: 1, mode: 'preset', preset: 'thisQuarter' }, not the resolved dates.

Fiscal periods depend on one reference instant and the effective policy for each column. When filtering is server-side, send the temporalContext supplied to beforefilterapply, pagination, or infinity-scroll loading. It contains:

  • the captured referenceInstant;
  • each temporal column’s resolved timezone and fiscalYearStart;
  • the resolved UTC start and exclusive endExclusive boundaries.

Using this envelope prevents the browser and server from resolving “this fiscal quarter” at different times or in different timezones.

  • Configuring only operators without fiscalYearStart; fiscal operators stay hidden.
  • Using zero-based months; January is 1, not 0.
  • Expecting thisQuarter in the Date filter to become fiscal; use thisFiscalQuarter.
  • Expecting Calendar Range to generate fiscal periods, or Timeline Brush to do so without enabling fiscalYear.
  • Persisting resolved dates instead of the relative fiscal operator or Relative Window expression.
  • Recalculating the period independently on a remote server instead of using temporalContext.