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
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.
Configure the fiscal year
Section titled “Configure the fiscal year”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.
Supported filters
Section titled “Supported filters”| Filter | Fiscal behavior |
|---|---|
| Date Filter | Supports This, Previous, and Next fiscal quarter and fiscal year. |
| Datetime Filter | Supports the same periods for exact instants, resolved in the column timezone. Saved IDs use the datetime prefix. |
| Relative Window | thisQuarter, yearToDate, and non-rolling custom quarter/year windows align to fiscalYearStart. |
| Filter Expressions | Supports phrases such as this fiscal quarter and previous fiscal year on date-aware columns. |
| Date range filter | Does not create fiscal periods automatically; users can select the fiscal boundary dates explicitly. |
| Timeline Brush | Supports an opt-in fiscalYear mode that groups source values at the configured fiscal-year boundary. |
| Time Matrix | Does 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.
Group a Timeline Brush by fiscal year
Section titled “Group a Timeline Brush by fiscal year”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.
Choose the available fiscal operators
Section titled “Choose the available fiscal operators”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 label | Date saved ID | Datetime saved ID |
|---|---|---|
| This fiscal quarter | thisFiscalQuarter | datetimeThisFiscalQuarter |
| Previous fiscal quarter | previousFiscalQuarter | datetimePreviousFiscalQuarter |
| Next fiscal quarter | nextFiscalQuarter | datetimeNextFiscalQuarter |
| This fiscal year | thisFiscalYear | datetimeThisFiscalYear |
| Previous fiscal year | previousFiscalYear | datetimePreviousFiscalYear |
| Next fiscal year | nextFiscalYear | datetimeNextFiscalYear |
These operators need no value. They are resolved from the captured reference instant, timezone, and fiscal-year start every time filtering runs.
Configure individual columns
Section titled “Configure individual columns”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.
Restore fiscal filter state
Section titled “Restore fiscal filter state”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.
Use fiscal Relative Windows
Section titled “Use fiscal Relative Windows”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, }, }, }), ],};thisQuarterresolves the current fiscal quarter.yearToDatebegins at the current fiscal-year start.- A custom quarter or year with
rolling: falsefollows 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.
Remote filtering
Section titled “Remote filtering”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
startand exclusiveendExclusiveboundaries.
Using this envelope prevents the browser and server from resolving “this fiscal quarter” at different times or in different timezones.
Common mistakes
Section titled “Common mistakes”- Configuring only
operatorswithoutfiscalYearStart; fiscal operators stay hidden. - Using zero-based months; January is
1, not0. - Expecting
thisQuarterin the Date filter to become fiscal; usethisFiscalQuarter. - 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.