# dreymonde/Time

🕰 Type-safe time calculations in Swift

Repository: https://github.com/dreymonde/Time
Canonical: https://ross.abutalabs.com/products/dreymonde-time
Homepage: https://medium.com/anysuggestion
Language: Swift
License: MIT
License Family: permissive
Topics: swift, ios, generics, time
Last push: 2022-05-06T09:03:47+00:00

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

## Adoption (not part of the score)
Stars 1063, forks 51 (observed 2026-08-28T04:03:26.374383+00:00)

## What it is
A Swift micro-library providing strongly-typed time intervals (e.g. Interval<Minute>) so durations like 10.minutes are type-safe and unit-aware. It supports arithmetic, comparison, and conversion between time units and Foundation's TimeInterval.

## Use cases
- represent durations type-safely in Swift
- avoid magic numbers like 10 * 60 for minutes
- do arithmetic on time intervals with different units
- add durations to Date objects
- convert between seconds, minutes, hours, and other time units

## When to choose
- you write Swift or iOS code with time calculations and want compile-time unit safety
- you want readable duration expressions like 10.minutes instead of raw TimeInterval doubles

## When to avoid
- you need calendar-aware date math (months, years, time zones) - use Foundation's Calendar
- your project is not in Swift

## Facets
- artifact type: library
- maturity: maintenance
- function: date-time, type-system
- domain: developer-tools, cross-platform
- platform: -
- tags: time-intervals, type-safe-time, swift-package, swift, ios, macos

## Member repositories
- dreymonde/Time (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:26.374383+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-30T06:56:38.817694+00:00, confidence not recorded.
  - readme: https://github.com/dreymonde/Time (fetched 2026-08-28T04:03:26.374383+00:00, sha 753b37eefd4a)
  - homepage: https://medium.com/anysuggestion (fetched 2026-08-29T12:58:00.774537+00:00, sha e9d83b93ba12)
- Data as of 2026-08-30T08:39:29.467469+00:00.
