Package

purescript-js-temporal

Repository
pete-murphy/purescript-js-temporal
License
MIT
Uploaded by
pacchettibotti
Published on
2026-02-21T22:05:31Z

PureScript bindings for the JavaScript Temporal API.

Installation

spago install js-temporal

Documentation

Generate HTML documentation with:

spago docs -f html

Output is written to generated-docs/html/index.html. Open in a browser to browse the API.

When contributing documentation, reference material can be fetched with:

./scripts/fetch-reference.sh

This populates reference/spec (tc39 Temporal spec) and reference/mdn (MDN Temporal docs).

Examples

The examples/ directory is a separate Spago package containing PureScript translations of recipes from the Temporal Cookbook. Run all examples:

nix develop
just run-examples

Or run a single example:

spago run -p js-temporal-examples -m Examples.Cookbook.CurrentDateTime

Setup

nix develop   # or: spago install
spago build
spago test

Node.js requires the Temporal flag: node --harmony-temporal. The nix develop shell provides a wrapped Node with this flag enabled.