# malcommac/SwiftDate

🐔 Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift.

Repository: https://github.com/malcommac/SwiftDate
Canonical: https://ross.abutalabs.com/products/swiftdate
Language: Swift
License: MIT
License Family: permissive
Topics: nsdate-category, swiftdate, date, date-formatting, date-time, timezone, nsdate, swift
Last push: 2023-09-19T09:59:48+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": 4137, "days_push": 1079, "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 7696, forks 774 (observed 2026-08-28T04:10:02.481183+00:00)

## What it is
SwiftDate is a Swift library for parsing, validating, manipulating, comparing, and formatting dates, times, and timezones across Apple platforms and Linux. It offers expressive syntax for date math, component extraction, derived dates, region-aware creation (timezone/calendar/locale), colloquial formatting in 140+ languages, and time period support.

## Use cases
- parse date strings in custom or ISO8601 formats in Swift
- format and display dates with timezones and locales in an iOS app
- do date math like adding hours and minutes to a date in Swift
- check if two dates are today, tomorrow, or in the same week
- convert dates between timezones and calendars
- generate relative date strings like '2 hours ago' in Swift
- generate random dates or enumerate date ranges in Swift

## When to choose
- You are building an iOS, macOS, or server-side Swift (Vapor/Kitura) app that needs rich date parsing, manipulation, or formatting beyond Foundation's basics
- You need colloquial/relative date formatting across many languages and locales
- You want an expressive, well-tested API for timezone, calendar, and time-period logic in Swift

## When to avoid
- Your project is not in Swift (the library targets Swift/Apple platforms and Linux)
- You only need trivial date handling that Foundation's Date and DateFormatter already cover and want zero extra dependencies
- You require a dependency with very recent release activity, as the latest release dates to September 2023

## Facets
- artifact type: library
- maturity: stable
- function: date-time, parser
- domain: developer-tools, cross-platform
- platform: cross-platform
- tags: date-manipulation, date-parsing, date-formatting, timezone, calendar, codable, time-periods, relative-dates, swift, ios, macos, linux

## Member repositories
- malcommac/SwiftDate (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:02.481183+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-29T17:36:00.757547+00:00, confidence not recorded.
  - readme: https://github.com/malcommac/SwiftDate (fetched 2026-08-28T04:10:02.481183+00:00, sha 1dc42ca7e85c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
