# davedelong/time

Robust and type-safe date and time calculations for Swift

Repository: https://github.com/davedelong/time
Canonical: https://ross.abutalabs.com/products/time
Language: Swift
License: MIT
License Family: permissive
Topics: swift, swift-library, date, datetime, date-time, date-formatting, dates, time, timezone, calendar, calendars, calendar-api
Last push: 2026-08-26T16:31:08+00:00

## Health v2 (maintenance only)
Score: 88/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 67, longevity 100
- inputs: {"age_days": 3228, "days_push": 7, "days_rel": 7, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2342, forks 82 (observed 2026-08-28T04:06:39.021035+00:00)

## What it is
A Swift package providing robust, type-safe date and time calculations built around regional clocks and calendar-aware value types. It prevents common calendar/timezone errors through restrictive, precise APIs.

## Use cases
- perform type-safe date and time calculations in Swift
- get the current day, hour, or minute with a regional clock
- format dates into human-readable strings
- handle timezones and calendars without bugs
- iterate over hours or days within a calendar period

## When to choose
- you're building an Apple-platform or Swift app that needs reliable calendar math
- you want compile-time safety around dates, times, and timezones
- you need precise date formatting and calendar traversal

## When to avoid
- you need date handling in a non-Swift language
- you must support macOS versions older than 13 or iOS older than 16
- you only need simple timestamp arithmetic already covered by Foundation

## Facets
- artifact type: library
- maturity: active
- function: date-time, sdk
- domain: developer-tools, cross-platform
- platform: cross-platform
- tags: swift-package, type-safety, calendar, timezone, date-formatting, swift, macos, ios

## Member repositories
- davedelong/time (main) score 88

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:39.021035+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-30T02:37:17.002739+00:00, confidence not recorded.
  - readme: https://github.com/davedelong/time (fetched 2026-08-28T04:06:39.021035+00:00, sha fc69677f16fc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
