# Carbon

> A simple PHP API extension for DateTime

Source: https://talira.ai/catalog/carbon-rsmmnymh
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / dates and times](https://talira.ai/categories/libraries/dates-and-times), [languages / php](https://talira.ai/categories/languages/php)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Self-hostable: yes[^2]
- Creator: Brian Nesbitt

Carbon is the standard date and time library for PHP, extending PHP's `DateTime` with a friendlier API. It adds and subtracts intervals with methods like `addDay()` and `subWeek()`, compares dates, converts between time zones, and formats dates for humans ("2 minutes ago", "next Friday") in hundreds of languages and regional formats. It offers immutable date objects so operations return new instances without side effects, plus CarbonInterval and CarbonPeriod for durations and ranges. Laravel has it built in, and it's MIT licensed.

## Links

- Website: https://carbon.nesbot.com/
- GitHub: https://github.com/briannesbitt/Carbon
- Docs: https://carbon.nesbot.com/guide/getting-started/introduction.html

## Problems it solves

- show dates in PHP as "2 days ago" or "in 3 hours"
- add or subtract days, weeks or months from a date in PHP without manual arithmetic
- convert dates between time zones in a PHP app
- format dates in many languages and locales in PHP
- compare dates and check whether a date is a weekend in PHP
- work with dates in PHP without mutating the original object

## Features

- extends PHP DateTime
- human-readable differences (diffForHumans)
- immutable date instances
- date arithmetic: add and subtract intervals
- time zone conversion
- localization in hundreds of languages with isoFormat
- date comparisons and helpers such as isWeekend and age
- CarbonInterval and CarbonPeriod

## Trust

Overall: 0.71 out of 1.
Signals: maintenance 1.00, adoption 0.84, momentum 0.60, community 1.00, backing 0.20, extensibility 0.00.

- last commit yesterday
- 150 commits in the last 90 days
- latest release 3.15.1 29 days ago
- 16.6k GitHub stars
- 389 contributors
- accepts sponsorship (Github, Open Collective, Tidelift)
- created by Brian Nesbitt

## Related

- Works with [Laravel](https://talira.ai/catalog/laravel-4d4w140j.md)

## Sources

[^1]: https://github.com/briannesbitt/Carbon/blob/master/LICENSE (checked 24 Nov 2026)
[^2]: https://carbon.nesbot.com/ (checked 24 Nov 2026)
