Carbon icon indicating copy to clipboard operation
Carbon copied to clipboard

A simple PHP API extension for DateTime.

Results 56 Carbon issues
Sort by recently updated
recently updated
newest added

|English|lv|comments| |--|--|--| |August|augustā|"augusts", because the current translation augustā means "in August" but you rather mean just "August" which is "augusts"|

translation

No need to use `version_compare` when the constant is sufficient.

This PR optimizes some conditions.

This PR adds type-hints for the return of all tests functions.

Hello, I encountered an issue with the following code: ```php $start = new Carbon("2022-11-11 22:29:50.000000"); $end = $start->copy()->addMonths(3); $now = $start->copy()->addDay(); echo "diffInMonths\n"; echo $start->diffInMonths($end) . "\n"; echo $now->diffInMonths($end) ....

needs investigation

the issue was introduced from 2.56.0 to fix https://github.com/briannesbitt/Carbon/issues/2529 I saw https://github.com/briannesbitt/Carbon/issues/2544 conversations, and I met same issue. There is another issue isn't mentioned, ``` >>> Carbon::now()->lessThanOrEqualTo('') => false >>>...

### [3.10.0](https://github.com/briannesbitt/Carbon/milestone/3.10.0) - Support PHP 8.5 Test upcoming changes You can run the checked stuff above adding "nesbot/carbon": "3.x-dev as 2.999", to your composer.json to test checked changes above with...

PHP will fix some DST issues, and behave differently when using `add()` or `modify()` which also leads to inconsistency as we use `modify()` for our add/sub methods. We also have...

php bug

Global setters like `setTestNow`, `serializeUsing`, `setTranslator` etc. are not isolated when called from factories: ```php CarbonImmutable::setTestNow('1990-07-31 23:59:59'); $libAFactory = new FactoryImmutable(); $libAFactory->setTestNow('2000-02-05 15:20:00'); $libBFactory = new FactoryImmutable(); $libBFactory->setTestNow('2050-12-01 00:00:00'); echo...

enhancement