Skip to content

DateConfig

Defined in: packages/engine/src/constants/Configuration.ts:32

Date-related configuration. Controls the bounds and formatting for date/time expression evaluation (e.g., today + 20 days, last monday).

readonly defaultFormat: string;

Defined in: packages/engine/src/constants/Configuration.ts:55

Default date string format for display (moment.js format string)


readonly maxOffsetYears: number;

Defined in: packages/engine/src/constants/Configuration.ts:51

How far forward a date offset whose COST grows with the offset may reach, in years. Enforced by vm/VM.ts’s addBusinessDays().

Bounds the walk, not the calendar. Every other date offset in the engine is arithmetic on a Date field, so today + 100000 days costs exactly what one day costs and needs no ceiling; workdays are the one offset that has to step day by day, because which days are skipped depends on where each step lands. today + 100000000 workdays therefore froze the host for thirteen seconds inside a single ADD opcode (where vm.maxInstructions cannot see it) and then answered “Invalid Date”, and a trillion never returned at all.

Release hardening: this field was declared, documented as a “safety limit”, and read nowhere, so it bounded nothing. A limit a host can configure and the engine ignores is worse than no limit, because it reads as protection that is not there.


readonly minOffsetYears: number;

Defined in: packages/engine/src/constants/Configuration.ts:53

How far BACK the same walk may reach, in years, as a negative number. See maxOffsetYears.