# akosma/SwiftMoment

A time and calendar manipulation library for  iOS 9+, macOS 10.11+, tvOS 9+, watchOS 2+ written in Swift 4.

Repository: https://github.com/akosma/SwiftMoment
Canonical: https://ross.abutalabs.com/products/swiftmoment
Homepage: http://akosma.github.io/SwiftMoment
Language: Swift
License: BSD-2-Clause
License Family: permissive
Archived: true
Last push: 2019-01-22T11:50:53+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4243, "days_push": 2780, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1601, forks 141 (observed 2026-08-28T04:05:09.607158+00:00)

## What it is
SwiftMoment is a time and calendar manipulation library for iOS 9+, macOS 10.11+, tvOS 9+, and watchOS 2+, written in Swift and inspired by Moment.js. It simplifies parsing dates from strings, formatting dates, extracting date components, and working with durations and intervals.

## Use cases
- parse dates from strings in swift
- format dates into readable strings on ios
- get day month year components from a date
- add or subtract durations from dates
- compare and manipulate time intervals in swift
- create dates from components like year month day hour

## When to choose
- you want a Moment.js-like fluent date API in Swift
- you need date parsing and formatting across Apple platforms
- you prefer a lightweight pure-Swift date library over raw Foundation NSDateFormatter code

## When to avoid
- you need a library with recent updates or Swift 5+ guarantees
- you only target Linux or non-Apple platforms
- you need timezone-heavy or calendar-system-rich functionality beyond basic manipulation

## Facets
- artifact type: library
- maturity: maintenance
- function: date-time, parser, sdk
- domain: developer-tools, mobile-development, cross-platform
- platform: -
- tags: moment-js-inspired, calendar, duration, swift-package-manager, cocoapods, carthage, ios, macos, swift, watchos, tvos

## Member repositories
- akosma/SwiftMoment (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:09.607158+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-30T03:52:47.373084+00:00, confidence not recorded.
  - readme: https://github.com/akosma/SwiftMoment (fetched 2026-08-28T04:05:09.607158+00:00, sha 8e0e345d25d3)
  - homepage: http://akosma.github.io/SwiftMoment (fetched 2026-08-29T11:24:15.569195+00:00, sha ff3dd7b52ed1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
