# briannesbitt/Carbon

A simple PHP API extension for DateTime.

Repository: https://github.com/briannesbitt/Carbon
Canonical: https://ross.abutalabs.com/products/briannesbitt-carbon
Homepage: https://carbon.nesbot.com/
Language: PHP
License: MIT
License Family: permissive
Last push: 2026-08-15T09:05:51+00:00

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

## Adoption (not part of the score)
Stars 16599, forks 1286 (observed 2026-08-28T04:11:16.816997+00:00)

## What it is
Carbon is a PHP library extending the native DateTime class with a fluent, immutable-friendly API for date and time manipulation. It supports date arithmetic, timezone conversion, comparisons, and human-readable localized formatting in hundreds of languages.

## Use cases
- format dates as '2 minutes ago' in PHP
- add or subtract days and weeks from a date
- convert dates between time zones
- localize date formatting for multiple languages
- compare and test dates in unit tests with mocked now
- parse and format RFC 2822 or ISO dates

## When to choose
- you write PHP and need richer date handling than DateTime
- you need human-readable relative dates in many languages
- you use Laravel or Symfony and want idiomatic date handling
- you need immutable date objects to avoid mutation bugs

## When to avoid
- you work outside PHP
- you only need trivial date formatting already covered by DateTime
- you need a language-agnostic date library for JavaScript or Python

## Facets
- artifact type: library
- maturity: stable
- function: date-time, internationalization, sdk
- domain: developer-tools, web-development
- platform: php, cross-platform
- tags: datetime, php-library, timezone, immutable-dates, human-readable-dates, laravel, localization

## Member repositories
- briannesbitt/Carbon (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:16.816997+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:04:51.050402+00:00, confidence not recorded.
  - readme: https://github.com/briannesbitt/Carbon (fetched 2026-08-28T04:11:16.816997+00:00, sha a52f89cd6090)
  - homepage: https://carbon.nesbot.com/ (fetched 2026-08-29T08:02:06.969052+00:00, sha b3dc07a33ba9)
  - site_page: https://carbon.nesbot.com/guide/getting-started/introduction.html (fetched 2026-08-29T08:02:07.026498+00:00, sha c16c2c337490)
  - site_page: https://carbon.nesbot.com/develop/changelog.html (fetched 2026-08-29T08:02:07.063681+00:00, sha 803c63c3c4fd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
