@nextera.one/tes-core
v1.0.0
Published
TES (Temporal Expression Standard) — unified package combining parser, resolver, and TPS bridge
Maintainers
Readme
@nextera.one/tes-core
TES — Temporal Expression Standard
Unified package combining the TES parser, resolver, and TPS bridge.
A compact, deterministic language for expressing time as intent.
Install
npm install @nextera.one/tes-coreQuick Start
import { tes, tesWithTPS, validate } from "@nextera.one/tes-core";
// Parse + resolve in one call
const result = tes("tes://2026/April[5^50]@10:00");
// {
// kind: 'span',
// resolved: {
// start: '2026-04-05T10:00:00',
// end: '2026-05-24T10:00:00'
// },
// duration: { days: 50, inclusive: true }
// }
// With TPS coordinates
const tpsResult = tesWithTPS("tes://2026/April[5^50]@10:00", {
lat: 31.9539,
lng: 35.9106,
});
// Validate
validate("tes://2026/April[5^50]"); // true
validate("invalid-expression"); // falseIndividual Imports
import { parse, stringify } from "@nextera.one/tes-core"; // parser
import { resolve } from "@nextera.one/tes-core"; // resolver
import { toTPS, fromTPS } from "@nextera.one/tes-core"; // TPS bridgeSyntax
| Expression | Meaning |
| ------------- | ----------------------------- |
| April[50] | 50th day from April 1 (point) |
| April[5^50] | Start April 5, 50 days span |
| @10:00 | Time attachment |
| !weekend | Skip weekends |
Packages
| Package | Responsibility |
| ----------------------------- | ------------------------- |
| @nextera.one/tes-parser | Lexer, parser, AST |
| @nextera.one/tes-resolver | Calendar math, exclusions |
| @nextera.one/tes-tps-bridge | TES ↔ TPS mapping |
| @nextera.one/tes-core | Unified (this package) |
License
MIT — Nextera.one
