# naoty/Timepiece

Intuitive date handling in Swift

Repository: https://github.com/naoty/Timepiece
Canonical: https://ross.abutalabs.com/products/timepiece
Language: Swift
License: MIT
License Family: permissive
Topics: swift, date
Last push: 2019-10-15T08:55:28+00:00

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

## Adoption (not part of the score)
Stars 2606, forks 141 (observed 2026-08-28T04:07:04.060617+00:00)

## What it is
Timepiece is a small Swift library that provides intuitive helpers for creating, calculating, changing, formatting, and parsing dates on top of Foundation. It consists of only four files and supports iOS, macOS, tvOS, and watchOS.

## Use cases
- create dates from year/month/day components in Swift
- add or subtract years, months, weeks, days, or hours from a date
- truncate a date to a specific unit like day or hour
- format dates as strings with given styles
- parse date strings from formats like yyyy/MM/dd or ISO8601
- get today's, yesterday's, or tomorrow's date

## When to choose
- you want readable, expressive date arithmetic in Swift without deep Calendar/DateComponents knowledge
- you prefer a tiny, auditable dependency (only 4 files)
- you target Apple platforms and use CocoaPods or Carthage

## When to avoid
- you need a full-featured date library with time zones, calendars, or locale-heavy logic
- your project is not on Apple platforms or not written in Swift
- you need a library with active ongoing development and recent releases

## Facets
- artifact type: library
- maturity: maintenance
- function: date-time
- domain: developer-tools, cross-platform
- platform: -
- tags: swift, date-handling, foundation, cocoapods, carthage, ios, macos

## Member repositories
- naoty/Timepiece (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:04.060617+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:21:00.404380+00:00, confidence not recorded.
  - readme: https://github.com/naoty/Timepiece (fetched 2026-08-28T04:07:04.060617+00:00, sha 2ecf1c6c80c4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
