Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

Carbon

> 编程语言
Open source

A simple PHP API extension for DateTime.

16.6K stars0 likes3 views
WebsiteGitHub

About

A simple PHP API extension for DateTime.

Carbon

An international PHP extension for DateTime. Documentation

[!NOTE]
We're migrating the repository from briannesbitt/Carbon to CarbonPHP/carbon, which means if you're looking specific issues/pull-requests, you may have to search both. No other impact as code on both will be kept up to date.

…

Installation

With Composer

$ composer require nesbot/carbon
json
{
    "require": {
        "nesbot/carbon": "^3"
    }
}
php
<?php
require 'vendor/autoload.php';

use Carbon\Carbon;

printf("Now: %s", Carbon::now());

Without Composer

Why are you not using composer? Download the Carbon latest release and put the contents of the ZIP archive into a directory in your project. Then require the file autoload.php to get all classes and dependencies loaded on need.

php
<?php
require 'path-to-Carbon-directory/autoload.php';

use Carbon\Carbon;

printf("Now: %s", Carbon::now());

Documentation

https://carbonphp.github.io/carbon/

Security contact information

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

Credits

Contributors

This project exists thanks to all the people who contribute.

Translators

Thanks to people helping us to translate Carbon in so many languages

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

See more

Issues· 10 open

View all issuesOpen on GitHub
  • #3371

    Locale formats contain CLDR pattern letters that isoFormat() reads differently

    bugUpdated Oct 1, 2026
  • #3373

    Support moment.js era tokens (N…NNNNN, y, yo) in isoFormat() and createFromIsoFormat()

    Updated Sep 30, 2026
  • #3374

    th locale: add Thai digits (alt_numbers)

    Updated Sep 30, 2026
  • #3372

    isoFormat(): first character after an L/l/LT macro expansion is replaced by the macro letter

    Updated Sep 30, 2026
  • #3231

    Migrate docs don't mention removal of `addReal*` and `diffInReal*` apis

    documentationUpdated Sep 1, 2025
  • #1681

    Carbon Road-map

    Updated May 1, 2025
  • #2989

    More granular v2 to v3 upgrade documentation?

    documentationUpdated Apr 11, 2024
  • #2835

    Carbon support for time-zone-aware doctrine types

    enhancementgood first issueUpdated Apr 7, 2024

> Tags

PHP

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言