# spencermountain/spacetime

A lightweight javascript timezone library

Repository: https://github.com/spencermountain/spacetime
Canonical: https://ross.abutalabs.com/products/spacetime
Homepage: http://spacetime.how/
Language: JavaScript
License: NOASSERTION
License Family: other
Topics: date-formatting, time-formatting, timezone, timezones, timezone-conversion, daylight-savings
Last push: 2026-07-13T13:09:31+00:00

## Health v2 (maintenance only)
Score: 89/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 92, release rhythm 78, longevity 100
- inputs: {"age_days": 3479, "days_push": 51, "days_rel": 71, "gap_med": 61.5, "n_releases_24m": 9}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4107, forks 190 (observed 2026-08-28T04:08:35.679177+00:00)

## What it is
Spacetime is a lightweight, zero-dependency JavaScript library for calculating dates and times across timezones. It provides a Moment-like immutable API that handles daylight savings, leap years, and hemisphere-aware date math.

## Use cases
- convert a date to a remote timezone like Europe/Paris
- calculate how many days until the end of the year
- figure out what time it was 11 hours ago
- check if it's lunchtime in France right now
- add or subtract months while keeping the time-of-day stable across DST shifts
- format dates and times in different timezones without the Intl API

## When to choose
- you need timezone-aware date math in a small bundle (~40kb, zero dependencies)
- you want a Moment-like immutable API without Moment's weight
- you need DST, leap-year, and hemisphere handling for most common cases

## When to avoid
- you need exhaustive, standards-perfect timezone handling for edge cases
- you need locale-aware formatting or parsing of arbitrary date strings
- you're already using a full-featured date library like date-fns or Luxon

## Facets
- artifact type: library
- maturity: stable
- function: date-time, sdk
- domain: developer-tools, web-development, cross-platform
- platform: browser
- tags: timezone-conversion, date-math, daylight-savings, immutable-api, zero-dependencies, moment-like, nodejs, javascript

## Member repositories
- spencermountain/spacetime (main) score 89

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:35.679177+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:23:13.429679+00:00, confidence not recorded.
  - readme: https://github.com/spencermountain/spacetime (fetched 2026-08-28T04:08:35.679177+00:00, sha fb8dfa6a1ffb)
  - homepage: http://spacetime.how/ (fetched 2026-08-29T09:15:01.415657+00:00, sha 72e83b42b166)
  - registry_npm: https://registry.npmjs.org/spacetime (fetched 2026-08-29T09:15:01.418220+00:00, sha 9849b1dd559b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
