Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/node20-and-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@taskade/temporal-parser": patch
---

Relax `engines.node` from `>=22` to `>=20` (the lowest line the Vitest 4 suite can run). CI now tests 20, 22, and 24. Node 18 is EOL and is not claimed. Docs-only: badges, playground link, and a “when to use this vs Temporal / luxon / date-fns” table. No parser or API changes.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [22.x, 24.x]
node-version: [20.x, 22.x, 24.x]

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,7 @@ Follow conventional commits:
## Questions?

Feel free to open an issue for questions or discussions.

## Development notes

This project was developed with LLM assistance (GPT 5.2 / Claude Sonnet 4.5), under human direction for design decisions, architecture, and verification. All code is tested and reviewed on a best-effort basis.
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

A lexer and parser for ISO 8601, RFC 3339, and IXDTF temporal expressions, built with compiler design principles.

By [Stan Chang](https://lxcid.com/) ([@lxcid](https://github.com/lxcid)).

[![npm](https://img.shields.io/npm/v/@taskade/temporal-parser?style=flat-square&color=FF2D60)](https://www.npmjs.com/package/@taskade/temporal-parser)
[![npm downloads](https://img.shields.io/npm/dm/@taskade/temporal-parser?style=flat-square)](https://www.npmjs.com/package/@taskade/temporal-parser)
[![CI](https://img.shields.io/github/actions/workflow/status/taskade/temporal-parser/ci.yml?branch=main&style=flat-square)](https://github.com/taskade/temporal-parser/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/github/license/taskade/temporal-parser?style=flat-square)](./LICENSE.md)

**Try it:** [interactive playground](https://lxcid.com/tools/temporal-playground/) · write-up: [announcing @taskade/temporal-parser](https://lxcid.com/2026/01/15/announcing-temporal-parser/) · sibling: [`@taskade/uri-parser`](https://github.com/taskade/uri-parser)

## When to use this

This library lexes and parses a temporal *string* into a typed AST (and stringifies it back). It does not do date math, and it does not validate calendar ranges.

| Need | Use |
| --- | --- |
| ISO 8601 / RFC 3339 / IXDTF / durations / ranges → AST | **this package** |
| Date/time *values*, arithmetic, calendars | [TC39 Temporal](https://tc39.es/proposal-temporal/docs/) (`PlainDate.from`, …). Temporal has no general `parse()` for these forms — feed it fields from the AST |
| Format, locale, “add 3 days” on a `Date` | [luxon](https://github.com/moment/luxon) or [date-fns](https://github.com/date-fns/date-fns) |

## Features

- **Standards compliant**: ISO 8601, RFC 3339, and IXDTF support
Expand All @@ -10,7 +29,7 @@ A lexer and parser for ISO 8601, RFC 3339, and IXDTF temporal expressions, built
- **Type-safe**: Written in TypeScript with full type definitions
- **Small footprint**: ~18KB minified
- **Dual module support**: ESM and CommonJS builds
- **Well tested**: 91% test coverage with 271 test cases
- **Well tested**: 91% test coverage with 461 test cases

## Installation

Expand Down Expand Up @@ -291,13 +310,13 @@ import type {
} from '@taskade/temporal-parser';
```

## Contributing
## Related

See [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup and guidelines.
- [`@taskade/uri-parser`](https://github.com/taskade/uri-parser) — same compiler approach for URIs (RFC 3986)

## Development
## Contributing

This project was developed with LLM assistance (GPT 5.2/Claude Sonnet 4.5), under human direction for design decisions, architecture, and verification. All code is tested and reviewed on a best-effort basis.
See [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup and guidelines.

## License

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"CHANGELOG.md"
],
"engines": {
"node": ">=22"
"node": ">=20"
},
"scripts": {
"build": "npm run clean && node scripts/build.mjs && npm run build:types",
Expand Down
Loading