TES Temporal Expression Standard
Spec Playground Packages Architecture Use Cases TesCron Checklist GitHub
NEXTERA.ONE

Temporal
Expression
Standard

A compact, deterministic language for expressing time as intent. Stop writing timestamps. Start expressing time.

// Express time as intent
tes://2026/April[5^50]@10:00
// Resolved output
{
  "start": "2026-04-05T10:00:00",
  "end":   "2026-05-24T10:00:00"
}

The Problem

{{ p }}

The Solution

{{ s }}
SPECIFICATION

Core Syntax

TES defines two primary expression types: Points and Spans.

{{ feat.title }}

{{ feat.desc }}

Formal Grammar (EBNF)

TES        = "tes://" Year "/" Expression ;
Expression = Month "[" Body "]" [Time] [Filter] ;
Body        = Number | Number "^" Number ;
Time        = "@" HH ":" mm [":" ss] ;
Filter      = "!" FilterList ;
FilterList = FilterItem { "," FilterItem } ;

Evaluation Rules

{{ rule.title }}

{{ rule.desc }}

TypeScript Types

type TemporalPoint = {
  kind: 'point';
  raw: string;
  canonical: { year: number; month: number; ordinal: number; anchorDay: 1 };
  resolved: { date: string };
};
type TemporalSpan = {
  kind: 'span';
  raw: string;
  canonical: { year: number; month: number; startDay: number; durationDays: number; countMode: 'calendar' | 'filtered'; exclude: string[] };
  resolved: { start: string; end: string };
  duration: { days: number; inclusive: true };
};
type TESResult = TemporalPoint | TemporalSpan;
type TESTPSResult = TESResult & { resolved: Gregorian + TPS };
TRY IT

Playground

Resolve TES expressions in real time.

EXPRESSION
RESULT
"kind": "{{ playgroundResult.kind }}"
"date": "{{ playgroundResult.resolved.date }}"
"ordinal":  {{ playgroundResult.canonical.ordinal }}
"start": "{{ playgroundResult.resolved.start }}"
"end":   "{{ playgroundResult.resolved.end }}"
"days":  {{ playgroundResult.duration.days }}
"countMode": "{{ playgroundResult.canonical.countMode }}"
"exclude": "{{ playgroundResult.canonical.exclude.join(', ') }}"
{{ playgroundError }}
QUICK EXAMPLES
SIMPLE TO FULL
{{ stage.level }}
{{ stage.title }}
{{ stage.expression }}

{{ stage.desc }}

{{ stage.output }}
FULL EXAMPLE
import { tes, tesWithTPS, validate } from '@nextera.one/tes-core';
import { TesCron } from '@nextera.one/tes-cron';
const expression = 'tes://2026/April[7^15]@09:30!friday,saturday,sunday';
if (!validate(expression)) throw new Error('Invalid TES');
const window = tes(expression);
// start: 2026-04-07T09:30:00
// end: 2026-04-30T09:30:00
const mapped = tesWithTPS(expression, { lat: 31.9539, lng: 35.9106 });
// startTps: TPS.y28.M4.W15.D2.H9.m30
@TesCron({ expression, trigger: 'start' })
openPayrollWindow() {}
NPM PACKAGES

Get Started

Install individual packages or the unified core.

{{ pkg.name }}
{{ pkg.scope }}

{{ pkg.desc }}

npm install {{ pkg.scope }}

Quick Start

import { tes, tesWithTPS, validate } from '@nextera.one/tes-core';
const basic = tes('tes://2026/April[1]');
const full = tes('tes://2026/April[7^15]@09:30!friday,saturday,sunday');
const mapped = tesWithTPS( 'tes://2026/April[7^15]@09:30!friday,saturday,sunday', { lat: 31.9539, lng: 35.9106 });
const ok = validate('tes://2026/April[7^15]@09:30!friday,saturday,sunday');
// basic.resolved.date -> '2026-04-01'
// full.canonical.countMode -> 'filtered'
// mapped.resolved.startTps -> 'tps://L:31.9539,35.9106/T:TPS.y28...'
// ok -> true
ARCHITECTURE

Temporal Compiler Model

TES is the source code. The Resolver is the compiler. TPS is the bytecode.

Ecosystem Integration

{{ eco.name }}
{{ eco.desc }}

TES ↔ TPS Mapping

TES → TPS (Deterministic)
tes://2026/April[5^50]
↓ resolve
2026-04-05 → 2026-05-24
↓ convert
tps://L:../T:TPS.y28.M4...
TPS → TES (Point Render)
tps://L:../T:TPS.y28.M5.W3...
↓ render
tes://2026/May[20]@10:00
// Span restore requires metadata
WHERE TO USE

Use Cases

{{ uc }}

Example Payloads

{{ ex.title }}
NESTJS INTEGRATION

Bring TES to NestJS

Use TES expressions directly inside NestJS with @TesCron() — intent-based, bounded, auditable scheduling.

Traditional @Cron()
// Every weekday at 10:00… forever
@Cron('0 10 * * 1-5')
sendReport() {}
// No start/end boundary
// No business-day logic
// No preserved intent
@TesCron() with TES
// 50 business days from April 5
@TesCron({
  expression: 'tes://2026/April[5^50]@10:00!weekend',
  trigger: 'start',
})
sendReport() {}
// Bounded + auditable + business-day aware

Cron vs TesCron

Capability @Cron @TesCron
{{ row.cap }} {{ row.cron }} {{ row.tes }}

Examples

{{ tc.title }}
npm install @nextera.one/tes-cron @nextera.one/tes-core
FOR YOUR TEAM

Developer Checklist

Everything needed to go from zero to production with TES.

{{ group.title }}
{{ item }}

Design Philosophy

{{ ph }}

"Time is not a number.
Time is intent.
TES captures that intent — precisely."

Stop calculating time.

Start expressing it.

npm install @nextera.one/tes-core