first commit

This commit is contained in:
Sampanna Rimal
2024-08-27 17:48:06 +05:45
commit 53c0140f58
10839 changed files with 1125847 additions and 0 deletions

10
vendor/nesbot/carbon/.phpstorm.meta.php vendored Normal file
View File

@ -0,0 +1,10 @@
<?php
namespace PHPSTORM_META {
registerArgumentsSet("date_units", "millenania", "millennium", "century", "centuries", "decade", "decades", "year", "years", "y", "yr", "yrs", "quarter", "quarters", "month", "months", "mo", "mos", "week", "weeks", "w", "day", "days", "d", "hour", "hours", "h", "minute", "minutes", "m", "second", "seconds", "s", "millisecond", "milliseconds", "milli", "ms", "microsecond", "microseconds", "micro", "µs");
expectedArguments(\Carbon\Traits\Units::add(), 0, argumentsSet("date_units"));
expectedArguments(\Carbon\Traits\Units::add(), 1, argumentsSet("date_units"));
expectedArguments(\Carbon\CarbonInterface::add(), 0, argumentsSet("date_units"));
expectedArguments(\Carbon\CarbonInterface::add(), 1, argumentsSet("date_units"));
expectedArguments(\Carbon\CarbonInterface::getTimeFormatByPrecision(), 0, "minute", "second", "m", "millisecond", "µ", "microsecond", "minutes", "seconds", "ms", "milliseconds", "µs", "microseconds");
}

19
vendor/nesbot/carbon/LICENSE vendored Normal file
View File

@ -0,0 +1,19 @@
Copyright (C) Brian Nesbitt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

23
vendor/nesbot/carbon/bin/carbon vendored Normal file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env php
<?php
use Carbon\Cli\Invoker;
$dir = __DIR__.'/..';
if (!file_exists($dir.'/autoload.php')) {
$dir = __DIR__.'/../vendor';
}
if (!file_exists($dir.'/autoload.php')) {
$dir = __DIR__.'/../../..';
}
if (!file_exists($dir.'/autoload.php')) {
echo 'Autoload not found.';
exit(1);
}
require $dir.'/autoload.php';
exit((new Invoker())(...$argv) ? 0 : 1);

4
vendor/nesbot/carbon/bin/carbon.bat vendored Normal file
View File

@ -0,0 +1,4 @@
@ECHO OFF
setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/carbon
php "%BIN_TARGET%" %*

127
vendor/nesbot/carbon/composer.json vendored Normal file
View File

@ -0,0 +1,127 @@
{
"name": "nesbot/carbon",
"description": "An API extension for DateTime that supports 281 different languages.",
"license": "MIT",
"type": "library",
"keywords": [
"date",
"time",
"DateTime"
],
"authors": [
{
"name": "Brian Nesbitt",
"email": "brian@nesbot.com",
"homepage": "https://markido.com"
},
{
"name": "kylekatarnls",
"homepage": "https://github.com/kylekatarnls"
}
],
"homepage": "https://carbon.nesbot.com",
"support": {
"issues": "https://github.com/briannesbitt/Carbon/issues",
"source": "https://github.com/briannesbitt/Carbon",
"docs": "https://carbon.nesbot.com/docs"
},
"funding": [
{
"url": "https://github.com/sponsors/kylekatarnls",
"type": "github"
},
{
"url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme",
"type": "tidelift"
},
{
"url": "https://opencollective.com/Carbon#sponsor",
"type": "opencollective"
}
],
"require": {
"php": "^7.1.8 || ^8.0",
"ext-json": "*",
"carbonphp/carbon-doctrine-types": "*",
"psr/clock": "^1.0",
"symfony/polyfill-mbstring": "^1.0",
"symfony/polyfill-php80": "^1.16",
"symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0"
},
"require-dev": {
"doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0",
"doctrine/orm": "^2.7 || ^3.0",
"friendsofphp/php-cs-fixer": "^3.0",
"kylekatarnls/multi-tester": "^2.0",
"ondrejmirtes/better-reflection": "*",
"phpmd/phpmd": "^2.9",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12.99 || ^1.7.14",
"phpunit/php-file-iterator": "^2.0.5 || ^3.0.6",
"phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20",
"squizlabs/php_codesniffer": "^3.4"
},
"provide": {
"psr/clock-implementation": "1.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Carbon\\": "src/Carbon/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
},
"files": [
"tests/Laravel/ServiceProvider.php"
]
},
"bin": [
"bin/carbon"
],
"config": {
"allow-plugins": {
"phpstan/extension-installer": true,
"composer/package-versions-deprecated": true
},
"process-timeout": 0,
"sort-packages": true
},
"extra": {
"branch-alias": {
"dev-3.x": "3.x-dev",
"dev-master": "2.x-dev"
},
"laravel": {
"providers": [
"Carbon\\Laravel\\ServiceProvider"
]
},
"phpstan": {
"includes": [
"extension.neon"
]
}
},
"scripts": {
"phpcs": "php-cs-fixer fix -v --diff --dry-run",
"phpdoc": "php phpdoc.php",
"phpmd": "phpmd src text /phpmd.xml",
"phpmd-test": "phpmd tests text /tests/phpmd-test.xml",
"phpstan": "phpstan analyse --configuration phpstan.neon",
"phpunit": "phpunit --verbose",
"style-check": [
"@phpcs",
"@phpstan",
"@phpmd"
],
"test": [
"@phpunit",
"@style-check"
],
"sponsors": "php sponsors.php"
}
}

5
vendor/nesbot/carbon/extension.neon vendored Normal file
View File

@ -0,0 +1,5 @@
services:
-
class: Carbon\PHPStan\MacroExtension
tags:
- phpstan.broker.methodsClassReflectionExtension

View File

@ -0,0 +1,28 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\MessageFormatter;
use Symfony\Component\Translation\Formatter\MessageFormatterInterface;
if (!class_exists(LazyMessageFormatter::class, false)) {
abstract class LazyMessageFormatter implements MessageFormatterInterface
{
public function format(string $message, string $locale, array $parameters = []): string
{
return $this->formatter->format(
$message,
$this->transformLocale($locale),
$parameters
);
}
}
}

View File

@ -0,0 +1,36 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\MessageFormatter;
use Symfony\Component\Translation\Formatter\ChoiceMessageFormatterInterface;
use Symfony\Component\Translation\Formatter\MessageFormatterInterface;
if (!class_exists(LazyMessageFormatter::class, false)) {
abstract class LazyMessageFormatter implements MessageFormatterInterface, ChoiceMessageFormatterInterface
{
abstract protected function transformLocale(?string $locale): ?string;
public function format($message, $locale, array $parameters = [])
{
return $this->formatter->format(
$message,
$this->transformLocale($locale),
$parameters
);
}
public function choiceFormat($message, $number, $locale, array $parameters = [])
{
return $this->formatter->choiceFormat($message, $number, $locale, $parameters);
}
}
}

View File

@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\PHPStan;
use PHPStan\BetterReflection\Reflection;
use ReflectionMethod;
if (!class_exists(AbstractReflectionMacro::class, false)) {
abstract class AbstractReflectionMacro extends AbstractMacro
{
/**
* {@inheritdoc}
*/
public function getReflection(): ?ReflectionMethod
{
if ($this->reflectionFunction instanceof Reflection\ReflectionMethod) {
return new Reflection\Adapter\ReflectionMethod($this->reflectionFunction);
}
return $this->reflectionFunction instanceof ReflectionMethod
? $this->reflectionFunction
: null;
}
}
}

View File

@ -0,0 +1,45 @@
<?php
declare(strict_types=1);
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\PHPStan;
use PHPStan\BetterReflection\Reflection;
use ReflectionMethod;
if (!class_exists(AbstractReflectionMacro::class, false)) {
abstract class AbstractReflectionMacro extends AbstractMacro
{
/**
* {@inheritdoc}
*/
public function getReflection(): ?Reflection\Adapter\ReflectionMethod
{
if ($this->reflectionFunction instanceof Reflection\Adapter\ReflectionMethod) {
return $this->reflectionFunction;
}
if ($this->reflectionFunction instanceof Reflection\ReflectionMethod) {
return new Reflection\Adapter\ReflectionMethod($this->reflectionFunction);
}
return $this->reflectionFunction instanceof ReflectionMethod
? new Reflection\Adapter\ReflectionMethod(
Reflection\ReflectionMethod::createFromName(
$this->reflectionFunction->getDeclaringClass()->getName(),
$this->reflectionFunction->getName()
)
)
: null;
}
}
}

View File

@ -0,0 +1,45 @@
<?php
declare(strict_types=1);
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\PHPStan;
if (!class_exists(LazyMacro::class, false)) {
abstract class LazyMacro extends AbstractReflectionMacro
{
/**
* {@inheritdoc}
*/
public function getFileName(): ?string
{
$file = $this->reflectionFunction->getFileName();
return (($file ? realpath($file) : null) ?: $file) ?: null;
}
/**
* {@inheritdoc}
*/
public function getStartLine(): ?int
{
return $this->reflectionFunction->getStartLine();
}
/**
* {@inheritdoc}
*/
public function getEndLine(): ?int
{
return $this->reflectionFunction->getEndLine();
}
}
}

View File

@ -0,0 +1,51 @@
<?php
declare(strict_types=1);
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\PHPStan;
if (!class_exists(LazyMacro::class, false)) {
abstract class LazyMacro extends AbstractReflectionMacro
{
/**
* {@inheritdoc}
*
* @return string|false
*/
public function getFileName()
{
$file = $this->reflectionFunction->getFileName();
return (($file ? realpath($file) : null) ?: $file) ?: null;
}
/**
* {@inheritdoc}
*
* @return int|false
*/
public function getStartLine()
{
return $this->reflectionFunction->getStartLine();
}
/**
* {@inheritdoc}
*
* @return int|false
*/
public function getEndLine()
{
return $this->reflectionFunction->getEndLine();
}
}
}

View File

@ -0,0 +1,52 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use Symfony\Component\Translation\MessageCatalogueInterface;
if (!class_exists(LazyTranslator::class, false)) {
class LazyTranslator extends AbstractTranslator implements TranslatorStrongTypeInterface
{
public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string
{
return $this->translate($id, $parameters, $domain, $locale);
}
public function getFromCatalogue(MessageCatalogueInterface $catalogue, string $id, string $domain = 'messages')
{
$messages = $this->getPrivateProperty($catalogue, 'messages');
if (isset($messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id])) {
return $messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id];
}
if (isset($messages[$domain][$id])) {
return $messages[$domain][$id];
}
$fallbackCatalogue = $this->getPrivateProperty($catalogue, 'fallbackCatalogue');
if ($fallbackCatalogue !== null) {
return $this->getFromCatalogue($fallbackCatalogue, $id, $domain);
}
return $id;
}
private function getPrivateProperty($instance, string $field)
{
return (function (string $field) {
return $this->$field;
})->call($instance, $field);
}
}
}

View File

@ -0,0 +1,32 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
if (!class_exists(LazyTranslator::class, false)) {
class LazyTranslator extends AbstractTranslator
{
/**
* Returns the translation.
*
* @param string|null $id
* @param array $parameters
* @param string|null $domain
* @param string|null $locale
*
* @return string
*/
public function trans($id, array $parameters = [], $domain = null, $locale = null)
{
return $this->translate($id, $parameters, $domain, $locale);
}
}
}

175
vendor/nesbot/carbon/readme.md vendored Normal file
View File

@ -0,0 +1,175 @@
# Carbon
[![Latest Stable Version](https://img.shields.io/packagist/v/nesbot/carbon.svg?style=flat-square)](https://packagist.org/packages/nesbot/carbon)
[![Total Downloads](https://img.shields.io/packagist/dt/nesbot/carbon.svg?style=flat-square)](https://packagist.org/packages/nesbot/carbon)
[![GitHub Actions](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fbriannesbitt%2FCarbon%2Fbadge&style=flat-square&label=Build&logo=none)](https://github.com/briannesbitt/Carbon/actions)
[![codecov.io](https://img.shields.io/codecov/c/github/briannesbitt/Carbon.svg?style=flat-square)](https://codecov.io/github/briannesbitt/Carbon?branch=master)
[![Tidelift](https://tidelift.com/badges/github/briannesbitt/Carbon)](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme)
An international PHP extension for DateTime. [https://carbon.nesbot.com](https://carbon.nesbot.com)
```php
<?php
use Carbon\Carbon;
printf("Right now is %s", Carbon::now()->toDateTimeString());
printf("Right now in Vancouver is %s", Carbon::now('America/Vancouver')); //implicit __toString()
$tomorrow = Carbon::now()->addDay();
$lastWeek = Carbon::now()->subWeek();
$nextSummerOlympics = Carbon::createFromDate(2016)->addYears(4);
$officialDate = Carbon::now()->toRfc2822String();
$howOldAmI = Carbon::createFromDate(1975, 5, 21)->age;
$noonTodayLondonTime = Carbon::createFromTime(12, 0, 0, 'Europe/London');
$internetWillBlowUpOn = Carbon::create(2038, 01, 19, 3, 14, 7, 'GMT');
// Don't really want this to happen so mock now
Carbon::setTestNow(Carbon::createFromDate(2000, 1, 1));
// comparisons are always done in UTC
if (Carbon::now()->gte($internetWillBlowUpOn)) {
die();
}
// Phew! Return to normal behaviour
Carbon::setTestNow();
if (Carbon::now()->isWeekend()) {
echo 'Party!';
}
// Over 200 languages (and over 500 regional variants) supported:
echo Carbon::now()->subMinutes(2)->diffForHumans(); // '2 minutes ago'
echo Carbon::now()->subMinutes(2)->locale('zh_CN')->diffForHumans(); // '2分钟前'
echo Carbon::parse('2019-07-23 14:51')->isoFormat('LLLL'); // 'Tuesday, July 23, 2019 2:51 PM'
echo Carbon::parse('2019-07-23 14:51')->locale('fr_FR')->isoFormat('LLLL'); // 'mardi 23 juillet 2019 14:51'
// ... but also does 'from now', 'after' and 'before'
// rolling up to seconds, minutes, hours, days, months, years
$daysSinceEpoch = Carbon::createFromTimestamp(0)->diffInDays();
```
[Get supported nesbot/carbon with the Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme)
## Installation
### With Composer
```
$ composer require nesbot/carbon
```
```json
{
"require": {
"nesbot/carbon": "^2.16"
}
}
```
```php
<?php
require 'vendor/autoload.php';
use Carbon\Carbon;
printf("Now: %s", Carbon::now());
```
### Without Composer
Why are you not using [composer](https://getcomposer.org/)? Download the Carbon [latest release](https://github.com/briannesbitt/Carbon/releases) 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());
```
## Docs
[https://carbon.nesbot.com/docs](https://carbon.nesbot.com/docs)
## Security contact information
To report a security vulnerability, please use the
[Tidelift security contact](https://tidelift.com/security).
Tidelift will coordinate the fix and disclosure.
## Credits
### Contributors
This project exists thanks to all the people who contribute.
<a href="https://github.com/briannesbitt/Carbon/graphs/contributors" target="_blank"><img src="https://opencollective.com/Carbon/contributors.svg?width=890&button=false" /></a>
### Translators
[Thanks to people helping us to translate Carbon in so many languages](https://carbon.nesbot.com/contribute/translators/)
### Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
<a href="https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme" target="_blank"><img src="https://carbon.nesbot.com/tidelift-brand.png" width="256" height="64"></a><!-- <open-collective-sponsors> -->
<a title="Онлайн казино 777 Україна" href="https://777.ua/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Онлайн казино" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/7e572d50-1ce8-4d69-ae12-86cc80371373/ok-ua-777.png" width="64" height="64"></a>
<a title="#1 Guide To Online Gambling In Canada" href="https://casinohex.org/canada/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="CasinoHex Canada" src="https://opencollective-production.s3.us-west-1.amazonaws.com/79fdbcc0-a997-11eb-abbc-25e48b63c6dc.jpg" width="85" height="64"></a>
<a title="Znajdź najlepsze zakłady bukmacherskie w Polsce w 2023 roku. Probukmacher.pl to Twoje kompendium wiedzy na temat bukmacherów!" href="https://www.probukmacher.pl?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Probukmacher" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/caf50271-4560-4ffe-a434-ea15239168db/Screenshot_1.png" width="89" height="64"></a>
<a title="Gives a fun for our users" href="https://slotoking.ua/games/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Игровые автоматы" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/94601d07-3205-4c60-9c2d-9b8194dbefb7/skg-blue.png" width="64" height="64"></a>
<a title="Casino-portugal.pt" href="https://casino-portugal.pt/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Casino-portugal.pt" src="https://logo.clearbit.com/casino-portugal.pt" width="64" height="64"></a>
<a title="Slots City® ➢ Лучшее лицензионно казино онлайн и оффлайн на гривны в Украине. 【 Более1500 игровых автоматов и слотов】✅ Официально и Безопасно" href="https://slotscity.ua/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Slots City" src="https://opencollective-production.s3.us-west-1.amazonaws.com/d7e298c0-7abe-11ed-8553-230872f5e54d.png" width="90" height="64"></a>
<a title="inkedin" href="https://inkedin.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="inkedin" src="https://logo.clearbit.com/inkedin.com" width="64" height="64"></a>
<a title="Актуальний та повносправний рейтинг онлайн казино України, ґрунтований на відгуках реальних гравців." href="https://uk.onlinecasino.in.ua/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Онлайн казино України" src="https://opencollective-production.s3.us-west-1.amazonaws.com/c0b4b090-eef8-11ec-9cb7-0527a205b226.png" width="64" height="64"></a>
<a title="OnlineCasinosSpelen" href="https://onlinecasinosspelen.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="OnlineCasinosSpelen" src="https://logo.clearbit.com/onlinecasinosspelen.com" width="64" height="64"></a>
<a title="Best non Gamstop sites in the UK" href="https://nongamstopcasinos.net/gb/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Best non Gamstop sites in the UK" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/34e340b8-e1de-4932-8a76-1b3ce2ec7ee8/logo_white%20bg%20(8).png" width="64" height="64"></a>
<a title="Real Money Pokies" href="https://www.nzfirst.org.nz/real-money-pokies/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Real Money Pokies" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/30d38232-a9d6-4e95-a48c-641fdc4d96fd/NZ_logo%20(6)%20(1)%20(1).jpg" width="64" height="64"></a>
<a title="Non GamStop Bookies UK" href="https://nongamstopbookies.com/uk/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Non GamStop Bookies UK" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/43c5561c-8907-4ef7-a4ee-c6da054788b8/logo-site%20(3).jpg" width="64" height="64"></a>
<a title="Актуальний топ-рейтинг українських онлайн казино на гривні! Щоденне оновлення топу та унікальна система ранжування, основана на відгуках гравців!" href="https://onlinecasino.in.ua/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Онлайн Казино Украины" src="https://opencollective-production.s3.us-west-1.amazonaws.com/8fdd8aa0-e273-11ec-a95e-d38fd331cabf.png" width="64" height="64"></a>
<a title="Twitter Video Downloader HD Tool allows you to store tweets on your device (mobile or PC) for free." href="https://ssstwitter.online/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="SSSTwitter" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/ba0d1daf-a894-4d98-95f7-a44d321364b3/Screenshot%202024-01-16%20at%2011.43.22.png" width="76" height="64"></a>
<a title="Entertainment" href="https://www.nongamstopbets.com/casinos-not-on-gamstop/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Non-GamStop Bets UK" src="https://logo.clearbit.com/nongamstopbets.com" width="64" height="64"></a>
<a title="Chudovo - international software development company with representative offices in Kyiv, Cologne, New York, Tallinn and London. It has been working on the market since 2006. Company has domain expertise in video security, logistics, medicine, finance and" href="https://chudovo.com/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Chudovo" src="https://opencollective-production.s3.us-west-1.amazonaws.com/326c19a0-2e87-11eb-a13a-c99a2a201d11.png" width="84" height="42"></a>
<a title="Entertainment" href="https://casinogap.org/uk/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="UK Casino Gap" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/143f9301-beec-4118-89d5-9a07a01345f3/casinogap-uk.png" width="42" height="42"></a>
<a title="NZ Gaming Portal" href="https://casinodeps.co.nz?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="NZ Casino Deps" src="https://logo.clearbit.com/casinodeps.co.nz" width="42" height="42"></a>
<a title="NonStop Sites" href="https://uk.nonstopcasino.org/non-gamstop-casinos/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="NonStopCasino.org" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/fd7ad905-8752-468f-ad20-582a24cca9d9/non-stop-casino.png" width="42" height="42"></a>
<a title="Siti Non AAMS" href="https://www.outlookindia.com/outlook-spotlight/migliori-siti-non-aams-siti-scommesse-senza-licenza-sicuri-news-294715?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Migliori Siti Non AAMS" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/392810da-6cb6-4938-a3cb-38bd0e1eb7de/migliori-siti-non-aams.png" width="42" height="42"></a>
<a title="List of trusted non GamStop casino reviews" href="https://nongamstopcasinos.org?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="UK NonGamStopCasinos" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/cbda0ee1-26ea-4252-9580-f1f9b317b1f7/nongamstopcasinos-uk.png" width="42" height="42"></a>
<a title="Online TikTok Video Download Tool" href="https://snaptik.pro?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="SnapTik" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/546bcd53-6615-457d-ab21-1db1c52b3af5/logo.jpg" width="42" height="42"></a>
<a title="IG Downloader is an Instagram Downloader service that offers a variety of tools to download Instagram content for free. Listed below are all the tools" href="https://indownloader.app/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="IG Downloader" src="https://logo.clearbit.com/indownloader.app" width="42" height="42"></a>
<a title="Proxidize is a mobile proxy creation and management platform that provides all needed components from hardware to cloud software and SIM cards." href="https://proxidize.com/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Proxidize" src="https://logo.clearbit.com/proxidize.com" width="42" height="42"></a>
<a title="Blastup offers Instagram growth services like buying likes, views, and followers, emphasizing real user engagement and instant delivery." href="https://blastup.com/buy-instagram-likes?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Blastup" src="https://opencollective-production.s3.us-west-1.amazonaws.com/account-avatar/955a0beb-9fe8-4753-ad92-fae8ef5382fc/favicon--dark.jpg" width="42" height="42"></a>
<a title="A self-hosted web radio management suite, including turnkey installer tools and an easy-to-use web app to manage your stations." href="https://azuracast.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="AzuraCast" src="https://opencollective-production.s3.us-west-1.amazonaws.com/3c12ea10-cdfb-11eb-9cf4-3760b386b76d.png" width="42" height="42"></a>
<a title="Triplebyte is the first software engineering job platform that is on the developer&#039;s side. Take our coding quiz!" href="https://triplebyte.com/os/opencollective?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Triplebyte" src="https://opencollective-production.s3.us-west-1.amazonaws.com/43e4f9d0-30cd-11ea-9c6b-e1142996e8b2.png" width="42" height="42"></a>
<a title="Connect your Collective to GitHub Sponsors: https://docs.opencollective.com/help/collectives/github-sponsors" href="https://github.com/sponsors/?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="GitHub Sponsors" src="https://opencollective-production.s3.us-west-1.amazonaws.com/87b1d240-f617-11ea-9960-fd7e8ab20fe4.png" width="48" height="42"></a>
<a title="Salesforce" href="https://engineering.salesforce.com?utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon" target="_blank"><img alt="Salesforce" src="https://opencollective-production.s3.us-west-1.amazonaws.com/24d34880-df8d-11e9-949c-6bc2037b6bd5.png" width="42" height="42"></a>
<!-- </open-collective-sponsors> -->
[[Become a sponsor via OpenCollective](https://opencollective.com/Carbon#sponsor)]
<a href="https://github.com/johnrsimeone" target="_blank"><img src="https://avatars.githubusercontent.com/u/22871068?s=70&v=4" width="64" height="64"></a>
<a href="https://github.com/taylorotwell" target="_blank"><img src="https://avatars.githubusercontent.com/u/463230?s=128&v=4" width="64" height="64"></a>
<a href="https://github.com/getsentry" target="_blank"><img src="https://avatars.githubusercontent.com/u/1396951?s=128&v=4" width="64" height="64"></a>
<a href="https://github.com/codecov" target="_blank"><img src="https://avatars.githubusercontent.com/u/8226205?s=128&v=4" width="64" height="64"></a>
[[Become a sponsor via GitHub](https://github.com/sponsors/kylekatarnls)]
### Backers
Thank you to all our backers! 🙏
<a href="https://opencollective.com/Carbon#backers" target="_blank"><img src="https://opencollective.com/Carbon/backers.svg?width=890&version=2023-06-08-07-12"></a>
[[Become a backer](https://opencollective.com/Carbon#backer)]
## Carbon for enterprise
Available as part of the Tidelift Subscription.
The maintainers of ``Carbon`` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)

129
vendor/nesbot/carbon/sponsors.php vendored Normal file
View File

@ -0,0 +1,129 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Carbon\CarbonImmutable;
require_once __DIR__.'/vendor/autoload.php';
function getMaxHistoryMonthsByAmount($amount): int
{
if ($amount >= 50) {
return 6;
}
if ($amount >= 20) {
return 4;
}
return 2;
}
function getHtmlAttribute($rawValue): string
{
return str_replace(
['', "\r"],
'',
trim(htmlspecialchars((string) $rawValue), "  \n\r\t\v\0"),
);
}
function getOpenCollectiveSponsors(): string
{
$customSponsorImages = [
// For consistency and equity among sponsors, as of now, we kindly ask our sponsors
// to provide an image having a width/height ratio between 1/1 and 2/1.
// By default, we'll show the member picture from OpenCollective, and will resize it if bigger
// int(OpenCollective.MemberId) => ImageURL
];
$members = json_decode(file_get_contents('https://opencollective.com/carbon/members/all.json'), true);
$list = array_filter($members, static function ($member): bool {
return ($member['lastTransactionAmount'] > 3 || $member['isActive']) &&
$member['role'] === 'BACKER' &&
$member['type'] !== 'USER' &&
(
$member['totalAmountDonated'] > 100 ||
$member['lastTransactionAt'] > CarbonImmutable::now()
->subMonthsNoOverflow(getMaxHistoryMonthsByAmount($member['lastTransactionAmount']))
->format('Y-m-d h:i') ||
$member['isActive'] && $member['lastTransactionAmount'] >= 30
);
});
$list = array_map(static function (array $member): array {
$createdAt = CarbonImmutable::parse($member['createdAt']);
$lastTransactionAt = CarbonImmutable::parse($member['lastTransactionAt']);
if ($createdAt->format('d H:i:s.u') > $lastTransactionAt->format('d H:i:s.u')) {
$createdAt = $createdAt
->setDay($lastTransactionAt->day)
->modify($lastTransactionAt->format('H:i:s.u'));
}
$monthlyContribution = (float) ($member['totalAmountDonated'] / ceil($createdAt->floatDiffInMonths()));
if (
$lastTransactionAt->isAfter('last month') &&
$member['lastTransactionAmount'] > $monthlyContribution
) {
$monthlyContribution = (float) $member['lastTransactionAmount'];
}
$yearlyContribution = (float) ($member['totalAmountDonated'] / max(1, $createdAt->floatDiffInYears()));
$status = null;
if ($monthlyContribution > 29) {
$status = 'sponsor';
} elseif ($monthlyContribution > 4.5 || $yearlyContribution > 29) {
$status = 'backer';
} elseif ($member['totalAmountDonated'] > 0) {
$status = 'helper';
}
return array_merge($member, [
'star' => ($monthlyContribution > 98 || $yearlyContribution > 500),
'status' => $status,
'monthlyContribution' => $monthlyContribution,
'yearlyContribution' => $yearlyContribution,
]);
}, $list);
usort($list, static function (array $a, array $b): int {
return ($b['monthlyContribution'] <=> $a['monthlyContribution'])
?: ($b['totalAmountDonated'] <=> $a['totalAmountDonated']);
});
return implode('', array_map(static function (array $member) use ($customSponsorImages): string {
$href = htmlspecialchars($member['website'] ?? $member['profile']);
$src = $customSponsorImages[$member['MemberId'] ?? ''] ?? $member['image'] ?? (strtr($member['profile'], ['https://opencollective.com/' => 'https://images.opencollective.com/']).'/avatar/256.png');
[$x, $y] = @getimagesize($src) ?: [0, 0];
$validImage = ($x && $y);
$src = $validImage ? htmlspecialchars($src) : 'https://opencollective.com/static/images/default-guest-logo.svg';
$height = $member['status'] === 'sponsor' ? 64 : 42;
$width = min($height * 2, $validImage ? round($x * $height / $y) : $height);
$href .= (strpos($href, '?') === false ? '?' : '&amp;').'utm_source=opencollective&amp;utm_medium=github&amp;utm_campaign=Carbon';
$title = getHtmlAttribute(($member['description'] ?? null) ?: $member['name']);
$alt = getHtmlAttribute($member['name']);
return "\n".'<a title="'.$title.'" href="'.$href.'" target="_blank">'.
'<img alt="'.$alt.'" src="'.$src.'" width="'.$width.'" height="'.$height.'">'.
'</a>';
}, $list))."\n";
}
file_put_contents('readme.md', preg_replace_callback(
'/(<!-- <open-collective-sponsors> -->)[\s\S]+(<!-- <\/open-collective-sponsors> -->)/',
static function (array $match): string {
return $match[1].getOpenCollectiveSponsors().$match[2];
},
file_get_contents('readme.md')
));

View File

@ -0,0 +1,398 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use Carbon\MessageFormatter\MessageFormatterMapper;
use Closure;
use ReflectionException;
use ReflectionFunction;
use Symfony\Component\Translation;
use Symfony\Component\Translation\Formatter\MessageFormatterInterface;
use Symfony\Component\Translation\Loader\ArrayLoader;
abstract class AbstractTranslator extends Translation\Translator
{
/**
* Translator singletons for each language.
*
* @var array
*/
protected static $singletons = [];
/**
* List of custom localized messages.
*
* @var array
*/
protected $messages = [];
/**
* List of custom directories that contain translation files.
*
* @var string[]
*/
protected $directories = [];
/**
* Set to true while constructing.
*
* @var bool
*/
protected $initializing = false;
/**
* List of locales aliases.
*
* @var array<string, string>
*/
protected $aliases = [
'me' => 'sr_Latn_ME',
'scr' => 'sh',
];
/**
* Return a singleton instance of Translator.
*
* @param string|null $locale optional initial locale ("en" - english by default)
*
* @return static
*/
public static function get($locale = null)
{
$locale = $locale ?: 'en';
$key = static::class === Translator::class ? $locale : static::class.'|'.$locale;
if (!isset(static::$singletons[$key])) {
static::$singletons[$key] = new static($locale);
}
return static::$singletons[$key];
}
public function __construct($locale, MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false)
{
parent::setLocale($locale);
$this->initializing = true;
$this->directories = [__DIR__.'/Lang'];
$this->addLoader('array', new ArrayLoader());
parent::__construct($locale, new MessageFormatterMapper($formatter), $cacheDir, $debug);
$this->initializing = false;
}
/**
* Returns the list of directories translation files are searched in.
*
* @return array
*/
public function getDirectories(): array
{
return $this->directories;
}
/**
* Set list of directories translation files are searched in.
*
* @param array $directories new directories list
*
* @return $this
*/
public function setDirectories(array $directories)
{
$this->directories = $directories;
return $this;
}
/**
* Add a directory to the list translation files are searched in.
*
* @param string $directory new directory
*
* @return $this
*/
public function addDirectory(string $directory)
{
$this->directories[] = $directory;
return $this;
}
/**
* Remove a directory from the list translation files are searched in.
*
* @param string $directory directory path
*
* @return $this
*/
public function removeDirectory(string $directory)
{
$search = rtrim(strtr($directory, '\\', '/'), '/');
return $this->setDirectories(array_filter($this->getDirectories(), function ($item) use ($search) {
return rtrim(strtr($item, '\\', '/'), '/') !== $search;
}));
}
/**
* Reset messages of a locale (all locale if no locale passed).
* Remove custom messages and reload initial messages from matching
* file in Lang directory.
*
* @param string|null $locale
*
* @return bool
*/
public function resetMessages($locale = null)
{
if ($locale === null) {
$this->messages = [];
return true;
}
foreach ($this->getDirectories() as $directory) {
$data = @include sprintf('%s/%s.php', rtrim($directory, '\\/'), $locale);
if ($data !== false) {
$this->messages[$locale] = $data;
$this->addResource('array', $this->messages[$locale], $locale);
return true;
}
}
return false;
}
/**
* Returns the list of files matching a given locale prefix (or all if empty).
*
* @param string $prefix prefix required to filter result
*
* @return array
*/
public function getLocalesFiles($prefix = '')
{
$files = [];
foreach ($this->getDirectories() as $directory) {
$directory = rtrim($directory, '\\/');
foreach (glob("$directory/$prefix*.php") as $file) {
$files[] = $file;
}
}
return array_unique($files);
}
/**
* Returns the list of internally available locales and already loaded custom locales.
* (It will ignore custom translator dynamic loading.)
*
* @param string $prefix prefix required to filter result
*
* @return array
*/
public function getAvailableLocales($prefix = '')
{
$locales = [];
foreach ($this->getLocalesFiles($prefix) as $file) {
$locales[] = substr($file, strrpos($file, '/') + 1, -4);
}
return array_unique(array_merge($locales, array_keys($this->messages)));
}
protected function translate(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string
{
if ($domain === null) {
$domain = 'messages';
}
$catalogue = $this->getCatalogue($locale);
$format = $this instanceof TranslatorStrongTypeInterface
? $this->getFromCatalogue($catalogue, (string) $id, $domain)
: $this->getCatalogue($locale)->get((string) $id, $domain); // @codeCoverageIgnore
if ($format instanceof Closure) {
// @codeCoverageIgnoreStart
try {
$count = (new ReflectionFunction($format))->getNumberOfRequiredParameters();
} catch (ReflectionException $exception) {
$count = 0;
}
// @codeCoverageIgnoreEnd
return $format(
...array_values($parameters),
...array_fill(0, max(0, $count - \count($parameters)), null)
);
}
return parent::trans($id, $parameters, $domain, $locale);
}
/**
* Init messages language from matching file in Lang directory.
*
* @param string $locale
*
* @return bool
*/
protected function loadMessagesFromFile($locale)
{
return isset($this->messages[$locale]) || $this->resetMessages($locale);
}
/**
* Set messages of a locale and take file first if present.
*
* @param string $locale
* @param array $messages
*
* @return $this
*/
public function setMessages($locale, $messages)
{
$this->loadMessagesFromFile($locale);
$this->addResource('array', $messages, $locale);
$this->messages[$locale] = array_merge(
$this->messages[$locale] ?? [],
$messages
);
return $this;
}
/**
* Set messages of the current locale and take file first if present.
*
* @param array $messages
*
* @return $this
*/
public function setTranslations($messages)
{
return $this->setMessages($this->getLocale(), $messages);
}
/**
* Get messages of a locale, if none given, return all the
* languages.
*
* @param string|null $locale
*
* @return array
*/
public function getMessages($locale = null)
{
return $locale === null ? $this->messages : $this->messages[$locale];
}
/**
* Set the current translator locale and indicate if the source locale file exists
*
* @param string $locale locale ex. en
*
* @return bool
*/
public function setLocale($locale)
{
$locale = preg_replace_callback('/[-_]([a-z]{2,}|\d{2,})/', function ($matches) {
// _2-letters or YUE is a region, _3+-letters is a variant
$upper = strtoupper($matches[1]);
if ($upper === 'YUE' || $upper === 'ISO' || \strlen($upper) < 3) {
return "_$upper";
}
return '_'.ucfirst($matches[1]);
}, strtolower($locale));
$previousLocale = $this->getLocale();
if ($previousLocale === $locale && isset($this->messages[$locale])) {
return true;
}
unset(static::$singletons[$previousLocale]);
if ($locale === 'auto') {
$completeLocale = setlocale(LC_TIME, '0');
$locale = preg_replace('/^([^_.-]+).*$/', '$1', $completeLocale);
$locales = $this->getAvailableLocales($locale);
$completeLocaleChunks = preg_split('/[_.-]+/', $completeLocale);
$getScore = function ($language) use ($completeLocaleChunks) {
return self::compareChunkLists($completeLocaleChunks, preg_split('/[_.-]+/', $language));
};
usort($locales, function ($first, $second) use ($getScore) {
return $getScore($second) <=> $getScore($first);
});
$locale = $locales[0];
}
if (isset($this->aliases[$locale])) {
$locale = $this->aliases[$locale];
}
// If subtag (ex: en_CA) first load the macro (ex: en) to have a fallback
if (str_contains($locale, '_') &&
$this->loadMessagesFromFile($macroLocale = preg_replace('/^([^_]+).*$/', '$1', $locale))
) {
parent::setLocale($macroLocale);
}
if (!$this->loadMessagesFromFile($locale) && !$this->initializing) {
return false;
}
parent::setLocale($locale);
return true;
}
/**
* Show locale on var_dump().
*
* @return array
*/
public function __debugInfo()
{
return [
'locale' => $this->getLocale(),
];
}
private static function compareChunkLists($referenceChunks, $chunks)
{
$score = 0;
foreach ($referenceChunks as $index => $chunk) {
if (!isset($chunks[$index])) {
$score++;
continue;
}
if (strtolower($chunks[$index]) === strtolower($chunk)) {
$score += 10;
}
}
return $score;
}
}

View File

@ -0,0 +1,523 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use Carbon\Traits\Date;
use Carbon\Traits\DeprecatedProperties;
use DateTime;
use DateTimeInterface;
use DateTimeZone;
/**
* A simple API extension for DateTime.
*
* @mixin DeprecatedProperties
*
* <autodoc generated by `composer phpdoc`>
*
* @property int $year
* @property int $yearIso
* @property int $month
* @property int $day
* @property int $hour
* @property int $minute
* @property int $second
* @property int $micro
* @property int $microsecond
* @property int|float|string $timestamp seconds since the Unix Epoch
* @property string $englishDayOfWeek the day of week in English
* @property string $shortEnglishDayOfWeek the abbreviated day of week in English
* @property string $englishMonth the month in English
* @property string $shortEnglishMonth the abbreviated month in English
* @property int $milliseconds
* @property int $millisecond
* @property int $milli
* @property int $week 1 through 53
* @property int $isoWeek 1 through 53
* @property int $weekYear year according to week format
* @property int $isoWeekYear year according to ISO week format
* @property int $dayOfYear 1 through 366
* @property int $age does a diffInYears() with default parameters
* @property int $offset the timezone offset in seconds from UTC
* @property int $offsetMinutes the timezone offset in minutes from UTC
* @property int $offsetHours the timezone offset in hours from UTC
* @property CarbonTimeZone $timezone the current timezone
* @property CarbonTimeZone $tz alias of $timezone
* @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday)
* @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday)
* @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday
* @property-read int $daysInMonth number of days in the given month
* @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark)
* @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark)
* @property-read string $timezoneAbbreviatedName the current timezone abbreviated name
* @property-read string $tzAbbrName alias of $timezoneAbbreviatedName
* @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language
* @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language
* @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language
* @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language
* @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language
* @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language
* @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language
* @property-read int $noZeroHour current hour from 1 to 24
* @property-read int $weeksInYear 51 through 53
* @property-read int $isoWeeksInYear 51 through 53
* @property-read int $weekOfMonth 1 through 5
* @property-read int $weekNumberInMonth 1 through 5
* @property-read int $firstWeekDay 0 through 6
* @property-read int $lastWeekDay 0 through 6
* @property-read int $daysInYear 365 or 366
* @property-read int $quarter the quarter of this instance, 1 - 4
* @property-read int $decade the decade of this instance
* @property-read int $century the century of this instance
* @property-read int $millennium the millennium of this instance
* @property-read bool $dst daylight savings time indicator, true if DST, false otherwise
* @property-read bool $local checks if the timezone is local, true if local, false otherwise
* @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise
* @property-read string $timezoneName the current timezone name
* @property-read string $tzName alias of $timezoneName
* @property-read string $locale locale of the current instance
*
* @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.)
* @method bool isLocal() Check if the current instance has non-UTC timezone.
* @method bool isValid() Check if the current instance is a valid date.
* @method bool isDST() Check if the current instance is in a daylight saving time.
* @method bool isSunday() Checks if the instance day is sunday.
* @method bool isMonday() Checks if the instance day is monday.
* @method bool isTuesday() Checks if the instance day is tuesday.
* @method bool isWednesday() Checks if the instance day is wednesday.
* @method bool isThursday() Checks if the instance day is thursday.
* @method bool isFriday() Checks if the instance day is friday.
* @method bool isSaturday() Checks if the instance day is saturday.
* @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentYear() Checks if the instance is in the same year as the current moment.
* @method bool isNextYear() Checks if the instance is in the same year as the current moment next year.
* @method bool isLastYear() Checks if the instance is in the same year as the current moment last year.
* @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment.
* @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week.
* @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week.
* @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentDay() Checks if the instance is in the same day as the current moment.
* @method bool isNextDay() Checks if the instance is in the same day as the current moment next day.
* @method bool isLastDay() Checks if the instance is in the same day as the current moment last day.
* @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment.
* @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour.
* @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour.
* @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment.
* @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute.
* @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute.
* @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment.
* @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second.
* @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second.
* @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment.
* @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond.
* @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond.
* @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment.
* @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond.
* @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond.
* @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment.
* @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month.
* @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month.
* @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment.
* @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter.
* @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter.
* @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment.
* @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade.
* @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade.
* @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment.
* @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century.
* @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century.
* @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment.
* @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium.
* @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium.
* @method $this years(int $value) Set current instance year to the given value.
* @method $this year(int $value) Set current instance year to the given value.
* @method $this setYears(int $value) Set current instance year to the given value.
* @method $this setYear(int $value) Set current instance year to the given value.
* @method $this months(int $value) Set current instance month to the given value.
* @method $this month(int $value) Set current instance month to the given value.
* @method $this setMonths(int $value) Set current instance month to the given value.
* @method $this setMonth(int $value) Set current instance month to the given value.
* @method $this days(int $value) Set current instance day to the given value.
* @method $this day(int $value) Set current instance day to the given value.
* @method $this setDays(int $value) Set current instance day to the given value.
* @method $this setDay(int $value) Set current instance day to the given value.
* @method $this hours(int $value) Set current instance hour to the given value.
* @method $this hour(int $value) Set current instance hour to the given value.
* @method $this setHours(int $value) Set current instance hour to the given value.
* @method $this setHour(int $value) Set current instance hour to the given value.
* @method $this minutes(int $value) Set current instance minute to the given value.
* @method $this minute(int $value) Set current instance minute to the given value.
* @method $this setMinutes(int $value) Set current instance minute to the given value.
* @method $this setMinute(int $value) Set current instance minute to the given value.
* @method $this seconds(int $value) Set current instance second to the given value.
* @method $this second(int $value) Set current instance second to the given value.
* @method $this setSeconds(int $value) Set current instance second to the given value.
* @method $this setSecond(int $value) Set current instance second to the given value.
* @method $this millis(int $value) Set current instance millisecond to the given value.
* @method $this milli(int $value) Set current instance millisecond to the given value.
* @method $this setMillis(int $value) Set current instance millisecond to the given value.
* @method $this setMilli(int $value) Set current instance millisecond to the given value.
* @method $this milliseconds(int $value) Set current instance millisecond to the given value.
* @method $this millisecond(int $value) Set current instance millisecond to the given value.
* @method $this setMilliseconds(int $value) Set current instance millisecond to the given value.
* @method $this setMillisecond(int $value) Set current instance millisecond to the given value.
* @method $this micros(int $value) Set current instance microsecond to the given value.
* @method $this micro(int $value) Set current instance microsecond to the given value.
* @method $this setMicros(int $value) Set current instance microsecond to the given value.
* @method $this setMicro(int $value) Set current instance microsecond to the given value.
* @method $this microseconds(int $value) Set current instance microsecond to the given value.
* @method $this microsecond(int $value) Set current instance microsecond to the given value.
* @method $this setMicroseconds(int $value) Set current instance microsecond to the given value.
* @method $this setMicrosecond(int $value) Set current instance microsecond to the given value.
* @method $this addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval).
* @method $this addYear() Add one year to the instance (using date interval).
* @method $this subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval).
* @method $this subYear() Sub one year to the instance (using date interval).
* @method $this addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed.
* @method $this subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed.
* @method $this addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval).
* @method $this addMonth() Add one month to the instance (using date interval).
* @method $this subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval).
* @method $this subMonth() Sub one month to the instance (using date interval).
* @method $this addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed.
* @method $this subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed.
* @method $this addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval).
* @method $this addDay() Add one day to the instance (using date interval).
* @method $this subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval).
* @method $this subDay() Sub one day to the instance (using date interval).
* @method $this addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval).
* @method $this addHour() Add one hour to the instance (using date interval).
* @method $this subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval).
* @method $this subHour() Sub one hour to the instance (using date interval).
* @method $this addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval).
* @method $this addMinute() Add one minute to the instance (using date interval).
* @method $this subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval).
* @method $this subMinute() Sub one minute to the instance (using date interval).
* @method $this addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval).
* @method $this addSecond() Add one second to the instance (using date interval).
* @method $this subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval).
* @method $this subSecond() Sub one second to the instance (using date interval).
* @method $this addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval).
* @method $this addMilli() Add one millisecond to the instance (using date interval).
* @method $this subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval).
* @method $this subMilli() Sub one millisecond to the instance (using date interval).
* @method $this addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval).
* @method $this addMillisecond() Add one millisecond to the instance (using date interval).
* @method $this subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval).
* @method $this subMillisecond() Sub one millisecond to the instance (using date interval).
* @method $this addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval).
* @method $this addMicro() Add one microsecond to the instance (using date interval).
* @method $this subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval).
* @method $this subMicro() Sub one microsecond to the instance (using date interval).
* @method $this addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval).
* @method $this addMicrosecond() Add one microsecond to the instance (using date interval).
* @method $this subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval).
* @method $this subMicrosecond() Sub one microsecond to the instance (using date interval).
* @method $this addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval).
* @method $this addMillennium() Add one millennium to the instance (using date interval).
* @method $this subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval).
* @method $this subMillennium() Sub one millennium to the instance (using date interval).
* @method $this addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed.
* @method $this subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed.
* @method $this addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval).
* @method $this addCentury() Add one century to the instance (using date interval).
* @method $this subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval).
* @method $this subCentury() Sub one century to the instance (using date interval).
* @method $this addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed.
* @method $this subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed.
* @method $this addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval).
* @method $this addDecade() Add one decade to the instance (using date interval).
* @method $this subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval).
* @method $this subDecade() Sub one decade to the instance (using date interval).
* @method $this addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed.
* @method $this subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed.
* @method $this addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval).
* @method $this addQuarter() Add one quarter to the instance (using date interval).
* @method $this subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval).
* @method $this subQuarter() Sub one quarter to the instance (using date interval).
* @method $this addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed.
* @method $this subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method $this subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed.
* @method $this addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method $this subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method $this addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval).
* @method $this addWeek() Add one week to the instance (using date interval).
* @method $this subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval).
* @method $this subWeek() Sub one week to the instance (using date interval).
* @method $this addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval).
* @method $this addWeekday() Add one weekday to the instance (using date interval).
* @method $this subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval).
* @method $this subWeekday() Sub one weekday to the instance (using date interval).
* @method $this addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp).
* @method $this addRealMicro() Add one microsecond to the instance (using timestamp).
* @method $this subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp).
* @method $this subRealMicro() Sub one microsecond to the instance (using timestamp).
* @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given.
* @method $this addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp).
* @method $this addRealMicrosecond() Add one microsecond to the instance (using timestamp).
* @method $this subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp).
* @method $this subRealMicrosecond() Sub one microsecond to the instance (using timestamp).
* @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given.
* @method $this addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp).
* @method $this addRealMilli() Add one millisecond to the instance (using timestamp).
* @method $this subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp).
* @method $this subRealMilli() Sub one millisecond to the instance (using timestamp).
* @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given.
* @method $this addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp).
* @method $this addRealMillisecond() Add one millisecond to the instance (using timestamp).
* @method $this subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp).
* @method $this subRealMillisecond() Sub one millisecond to the instance (using timestamp).
* @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given.
* @method $this addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp).
* @method $this addRealSecond() Add one second to the instance (using timestamp).
* @method $this subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp).
* @method $this subRealSecond() Sub one second to the instance (using timestamp).
* @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given.
* @method $this addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp).
* @method $this addRealMinute() Add one minute to the instance (using timestamp).
* @method $this subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp).
* @method $this subRealMinute() Sub one minute to the instance (using timestamp).
* @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given.
* @method $this addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp).
* @method $this addRealHour() Add one hour to the instance (using timestamp).
* @method $this subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp).
* @method $this subRealHour() Sub one hour to the instance (using timestamp).
* @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given.
* @method $this addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp).
* @method $this addRealDay() Add one day to the instance (using timestamp).
* @method $this subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp).
* @method $this subRealDay() Sub one day to the instance (using timestamp).
* @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given.
* @method $this addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp).
* @method $this addRealWeek() Add one week to the instance (using timestamp).
* @method $this subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp).
* @method $this subRealWeek() Sub one week to the instance (using timestamp).
* @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given.
* @method $this addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp).
* @method $this addRealMonth() Add one month to the instance (using timestamp).
* @method $this subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp).
* @method $this subRealMonth() Sub one month to the instance (using timestamp).
* @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given.
* @method $this addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp).
* @method $this addRealQuarter() Add one quarter to the instance (using timestamp).
* @method $this subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp).
* @method $this subRealQuarter() Sub one quarter to the instance (using timestamp).
* @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given.
* @method $this addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp).
* @method $this addRealYear() Add one year to the instance (using timestamp).
* @method $this subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp).
* @method $this subRealYear() Sub one year to the instance (using timestamp).
* @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given.
* @method $this addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp).
* @method $this addRealDecade() Add one decade to the instance (using timestamp).
* @method $this subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp).
* @method $this subRealDecade() Sub one decade to the instance (using timestamp).
* @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given.
* @method $this addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp).
* @method $this addRealCentury() Add one century to the instance (using timestamp).
* @method $this subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp).
* @method $this subRealCentury() Sub one century to the instance (using timestamp).
* @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given.
* @method $this addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp).
* @method $this addRealMillennium() Add one millennium to the instance (using timestamp).
* @method $this subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp).
* @method $this subRealMillennium() Sub one millennium to the instance (using timestamp).
* @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given.
* @method $this roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function.
* @method $this roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function.
* @method $this floorYear(float $precision = 1) Truncate the current instance year with given precision.
* @method $this floorYears(float $precision = 1) Truncate the current instance year with given precision.
* @method $this ceilYear(float $precision = 1) Ceil the current instance year with given precision.
* @method $this ceilYears(float $precision = 1) Ceil the current instance year with given precision.
* @method $this roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function.
* @method $this roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function.
* @method $this floorMonth(float $precision = 1) Truncate the current instance month with given precision.
* @method $this floorMonths(float $precision = 1) Truncate the current instance month with given precision.
* @method $this ceilMonth(float $precision = 1) Ceil the current instance month with given precision.
* @method $this ceilMonths(float $precision = 1) Ceil the current instance month with given precision.
* @method $this roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function.
* @method $this roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function.
* @method $this floorDay(float $precision = 1) Truncate the current instance day with given precision.
* @method $this floorDays(float $precision = 1) Truncate the current instance day with given precision.
* @method $this ceilDay(float $precision = 1) Ceil the current instance day with given precision.
* @method $this ceilDays(float $precision = 1) Ceil the current instance day with given precision.
* @method $this roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function.
* @method $this roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function.
* @method $this floorHour(float $precision = 1) Truncate the current instance hour with given precision.
* @method $this floorHours(float $precision = 1) Truncate the current instance hour with given precision.
* @method $this ceilHour(float $precision = 1) Ceil the current instance hour with given precision.
* @method $this ceilHours(float $precision = 1) Ceil the current instance hour with given precision.
* @method $this roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function.
* @method $this roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function.
* @method $this floorMinute(float $precision = 1) Truncate the current instance minute with given precision.
* @method $this floorMinutes(float $precision = 1) Truncate the current instance minute with given precision.
* @method $this ceilMinute(float $precision = 1) Ceil the current instance minute with given precision.
* @method $this ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision.
* @method $this roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function.
* @method $this roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function.
* @method $this floorSecond(float $precision = 1) Truncate the current instance second with given precision.
* @method $this floorSeconds(float $precision = 1) Truncate the current instance second with given precision.
* @method $this ceilSecond(float $precision = 1) Ceil the current instance second with given precision.
* @method $this ceilSeconds(float $precision = 1) Ceil the current instance second with given precision.
* @method $this roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function.
* @method $this roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function.
* @method $this floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision.
* @method $this floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision.
* @method $this ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision.
* @method $this ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision.
* @method $this roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function.
* @method $this roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function.
* @method $this floorCentury(float $precision = 1) Truncate the current instance century with given precision.
* @method $this floorCenturies(float $precision = 1) Truncate the current instance century with given precision.
* @method $this ceilCentury(float $precision = 1) Ceil the current instance century with given precision.
* @method $this ceilCenturies(float $precision = 1) Ceil the current instance century with given precision.
* @method $this roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function.
* @method $this roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function.
* @method $this floorDecade(float $precision = 1) Truncate the current instance decade with given precision.
* @method $this floorDecades(float $precision = 1) Truncate the current instance decade with given precision.
* @method $this ceilDecade(float $precision = 1) Ceil the current instance decade with given precision.
* @method $this ceilDecades(float $precision = 1) Ceil the current instance decade with given precision.
* @method $this roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function.
* @method $this roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function.
* @method $this floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision.
* @method $this floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision.
* @method $this ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision.
* @method $this ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision.
* @method $this roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function.
* @method $this roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function.
* @method $this floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision.
* @method $this floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision.
* @method $this ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision.
* @method $this ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision.
* @method $this roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function.
* @method $this roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function.
* @method $this floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision.
* @method $this floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision.
* @method $this ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision.
* @method $this ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision.
* @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method static static|false createFromFormat(string $format, string $time, DateTimeZone|string|false|null $timezone = null) Parse a string into a new Carbon object according to the specified format.
* @method static static __set_state(array $array) https://php.net/manual/en/datetime.set-state.php
*
* </autodoc>
*/
class Carbon extends DateTime implements CarbonInterface
{
use Date;
/**
* Returns true if the current class/instance is mutable.
*
* @return bool
*/
public static function isMutable()
{
return true;
}
}

View File

@ -0,0 +1,19 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use DateTimeInterface;
interface CarbonConverterInterface
{
public function convertDate(DateTimeInterface $dateTime, bool $negated = false): CarbonInterface;
}

View File

@ -0,0 +1,582 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use Carbon\Traits\Date;
use Carbon\Traits\DeprecatedProperties;
use DateTimeImmutable;
use DateTimeInterface;
use DateTimeZone;
/**
* A simple API extension for DateTimeImmutable.
*
* @mixin DeprecatedProperties
*
* <autodoc generated by `composer phpdoc`>
*
* @property int $year
* @property int $yearIso
* @property int $month
* @property int $day
* @property int $hour
* @property int $minute
* @property int $second
* @property int $micro
* @property int $microsecond
* @property int|float|string $timestamp seconds since the Unix Epoch
* @property string $englishDayOfWeek the day of week in English
* @property string $shortEnglishDayOfWeek the abbreviated day of week in English
* @property string $englishMonth the month in English
* @property string $shortEnglishMonth the abbreviated month in English
* @property int $milliseconds
* @property int $millisecond
* @property int $milli
* @property int $week 1 through 53
* @property int $isoWeek 1 through 53
* @property int $weekYear year according to week format
* @property int $isoWeekYear year according to ISO week format
* @property int $dayOfYear 1 through 366
* @property int $age does a diffInYears() with default parameters
* @property int $offset the timezone offset in seconds from UTC
* @property int $offsetMinutes the timezone offset in minutes from UTC
* @property int $offsetHours the timezone offset in hours from UTC
* @property CarbonTimeZone $timezone the current timezone
* @property CarbonTimeZone $tz alias of $timezone
* @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday)
* @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday)
* @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday
* @property-read int $daysInMonth number of days in the given month
* @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark)
* @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark)
* @property-read string $timezoneAbbreviatedName the current timezone abbreviated name
* @property-read string $tzAbbrName alias of $timezoneAbbreviatedName
* @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language
* @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language
* @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language
* @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language
* @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language
* @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language
* @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language
* @property-read int $noZeroHour current hour from 1 to 24
* @property-read int $weeksInYear 51 through 53
* @property-read int $isoWeeksInYear 51 through 53
* @property-read int $weekOfMonth 1 through 5
* @property-read int $weekNumberInMonth 1 through 5
* @property-read int $firstWeekDay 0 through 6
* @property-read int $lastWeekDay 0 through 6
* @property-read int $daysInYear 365 or 366
* @property-read int $quarter the quarter of this instance, 1 - 4
* @property-read int $decade the decade of this instance
* @property-read int $century the century of this instance
* @property-read int $millennium the millennium of this instance
* @property-read bool $dst daylight savings time indicator, true if DST, false otherwise
* @property-read bool $local checks if the timezone is local, true if local, false otherwise
* @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise
* @property-read string $timezoneName the current timezone name
* @property-read string $tzName alias of $timezoneName
* @property-read string $locale locale of the current instance
*
* @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.)
* @method bool isLocal() Check if the current instance has non-UTC timezone.
* @method bool isValid() Check if the current instance is a valid date.
* @method bool isDST() Check if the current instance is in a daylight saving time.
* @method bool isSunday() Checks if the instance day is sunday.
* @method bool isMonday() Checks if the instance day is monday.
* @method bool isTuesday() Checks if the instance day is tuesday.
* @method bool isWednesday() Checks if the instance day is wednesday.
* @method bool isThursday() Checks if the instance day is thursday.
* @method bool isFriday() Checks if the instance day is friday.
* @method bool isSaturday() Checks if the instance day is saturday.
* @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentYear() Checks if the instance is in the same year as the current moment.
* @method bool isNextYear() Checks if the instance is in the same year as the current moment next year.
* @method bool isLastYear() Checks if the instance is in the same year as the current moment last year.
* @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment.
* @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week.
* @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week.
* @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentDay() Checks if the instance is in the same day as the current moment.
* @method bool isNextDay() Checks if the instance is in the same day as the current moment next day.
* @method bool isLastDay() Checks if the instance is in the same day as the current moment last day.
* @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment.
* @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour.
* @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour.
* @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment.
* @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute.
* @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute.
* @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment.
* @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second.
* @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second.
* @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment.
* @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond.
* @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond.
* @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment.
* @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond.
* @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond.
* @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment.
* @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month.
* @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month.
* @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment.
* @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter.
* @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter.
* @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment.
* @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade.
* @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade.
* @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment.
* @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century.
* @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century.
* @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone).
* @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment.
* @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium.
* @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium.
* @method CarbonImmutable years(int $value) Set current instance year to the given value.
* @method CarbonImmutable year(int $value) Set current instance year to the given value.
* @method CarbonImmutable setYears(int $value) Set current instance year to the given value.
* @method CarbonImmutable setYear(int $value) Set current instance year to the given value.
* @method CarbonImmutable months(int $value) Set current instance month to the given value.
* @method CarbonImmutable month(int $value) Set current instance month to the given value.
* @method CarbonImmutable setMonths(int $value) Set current instance month to the given value.
* @method CarbonImmutable setMonth(int $value) Set current instance month to the given value.
* @method CarbonImmutable days(int $value) Set current instance day to the given value.
* @method CarbonImmutable day(int $value) Set current instance day to the given value.
* @method CarbonImmutable setDays(int $value) Set current instance day to the given value.
* @method CarbonImmutable setDay(int $value) Set current instance day to the given value.
* @method CarbonImmutable hours(int $value) Set current instance hour to the given value.
* @method CarbonImmutable hour(int $value) Set current instance hour to the given value.
* @method CarbonImmutable setHours(int $value) Set current instance hour to the given value.
* @method CarbonImmutable setHour(int $value) Set current instance hour to the given value.
* @method CarbonImmutable minutes(int $value) Set current instance minute to the given value.
* @method CarbonImmutable minute(int $value) Set current instance minute to the given value.
* @method CarbonImmutable setMinutes(int $value) Set current instance minute to the given value.
* @method CarbonImmutable setMinute(int $value) Set current instance minute to the given value.
* @method CarbonImmutable seconds(int $value) Set current instance second to the given value.
* @method CarbonImmutable second(int $value) Set current instance second to the given value.
* @method CarbonImmutable setSeconds(int $value) Set current instance second to the given value.
* @method CarbonImmutable setSecond(int $value) Set current instance second to the given value.
* @method CarbonImmutable millis(int $value) Set current instance millisecond to the given value.
* @method CarbonImmutable milli(int $value) Set current instance millisecond to the given value.
* @method CarbonImmutable setMillis(int $value) Set current instance millisecond to the given value.
* @method CarbonImmutable setMilli(int $value) Set current instance millisecond to the given value.
* @method CarbonImmutable milliseconds(int $value) Set current instance millisecond to the given value.
* @method CarbonImmutable millisecond(int $value) Set current instance millisecond to the given value.
* @method CarbonImmutable setMilliseconds(int $value) Set current instance millisecond to the given value.
* @method CarbonImmutable setMillisecond(int $value) Set current instance millisecond to the given value.
* @method CarbonImmutable micros(int $value) Set current instance microsecond to the given value.
* @method CarbonImmutable micro(int $value) Set current instance microsecond to the given value.
* @method CarbonImmutable setMicros(int $value) Set current instance microsecond to the given value.
* @method CarbonImmutable setMicro(int $value) Set current instance microsecond to the given value.
* @method CarbonImmutable microseconds(int $value) Set current instance microsecond to the given value.
* @method CarbonImmutable microsecond(int $value) Set current instance microsecond to the given value.
* @method CarbonImmutable setMicroseconds(int $value) Set current instance microsecond to the given value.
* @method CarbonImmutable setMicrosecond(int $value) Set current instance microsecond to the given value.
* @method CarbonImmutable addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addYear() Add one year to the instance (using date interval).
* @method CarbonImmutable subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subYear() Sub one year to the instance (using date interval).
* @method CarbonImmutable addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addMonth() Add one month to the instance (using date interval).
* @method CarbonImmutable subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subMonth() Sub one month to the instance (using date interval).
* @method CarbonImmutable addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addDay() Add one day to the instance (using date interval).
* @method CarbonImmutable subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subDay() Sub one day to the instance (using date interval).
* @method CarbonImmutable addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addHour() Add one hour to the instance (using date interval).
* @method CarbonImmutable subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subHour() Sub one hour to the instance (using date interval).
* @method CarbonImmutable addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addMinute() Add one minute to the instance (using date interval).
* @method CarbonImmutable subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subMinute() Sub one minute to the instance (using date interval).
* @method CarbonImmutable addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addSecond() Add one second to the instance (using date interval).
* @method CarbonImmutable subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subSecond() Sub one second to the instance (using date interval).
* @method CarbonImmutable addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addMilli() Add one millisecond to the instance (using date interval).
* @method CarbonImmutable subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subMilli() Sub one millisecond to the instance (using date interval).
* @method CarbonImmutable addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addMillisecond() Add one millisecond to the instance (using date interval).
* @method CarbonImmutable subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subMillisecond() Sub one millisecond to the instance (using date interval).
* @method CarbonImmutable addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addMicro() Add one microsecond to the instance (using date interval).
* @method CarbonImmutable subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subMicro() Sub one microsecond to the instance (using date interval).
* @method CarbonImmutable addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addMicrosecond() Add one microsecond to the instance (using date interval).
* @method CarbonImmutable subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subMicrosecond() Sub one microsecond to the instance (using date interval).
* @method CarbonImmutable addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addMillennium() Add one millennium to the instance (using date interval).
* @method CarbonImmutable subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subMillennium() Sub one millennium to the instance (using date interval).
* @method CarbonImmutable addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addCentury() Add one century to the instance (using date interval).
* @method CarbonImmutable subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subCentury() Sub one century to the instance (using date interval).
* @method CarbonImmutable addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addDecade() Add one decade to the instance (using date interval).
* @method CarbonImmutable subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subDecade() Sub one decade to the instance (using date interval).
* @method CarbonImmutable addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addQuarter() Add one quarter to the instance (using date interval).
* @method CarbonImmutable subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subQuarter() Sub one quarter to the instance (using date interval).
* @method CarbonImmutable addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed.
* @method CarbonImmutable addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden.
* @method CarbonImmutable addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addWeek() Add one week to the instance (using date interval).
* @method CarbonImmutable subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subWeek() Sub one week to the instance (using date interval).
* @method CarbonImmutable addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable addWeekday() Add one weekday to the instance (using date interval).
* @method CarbonImmutable subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval).
* @method CarbonImmutable subWeekday() Sub one weekday to the instance (using date interval).
* @method CarbonImmutable addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealMicro() Add one microsecond to the instance (using timestamp).
* @method CarbonImmutable subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealMicro() Sub one microsecond to the instance (using timestamp).
* @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given.
* @method CarbonImmutable addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealMicrosecond() Add one microsecond to the instance (using timestamp).
* @method CarbonImmutable subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealMicrosecond() Sub one microsecond to the instance (using timestamp).
* @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given.
* @method CarbonImmutable addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealMilli() Add one millisecond to the instance (using timestamp).
* @method CarbonImmutable subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealMilli() Sub one millisecond to the instance (using timestamp).
* @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given.
* @method CarbonImmutable addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealMillisecond() Add one millisecond to the instance (using timestamp).
* @method CarbonImmutable subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealMillisecond() Sub one millisecond to the instance (using timestamp).
* @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given.
* @method CarbonImmutable addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealSecond() Add one second to the instance (using timestamp).
* @method CarbonImmutable subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealSecond() Sub one second to the instance (using timestamp).
* @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given.
* @method CarbonImmutable addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealMinute() Add one minute to the instance (using timestamp).
* @method CarbonImmutable subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealMinute() Sub one minute to the instance (using timestamp).
* @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given.
* @method CarbonImmutable addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealHour() Add one hour to the instance (using timestamp).
* @method CarbonImmutable subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealHour() Sub one hour to the instance (using timestamp).
* @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given.
* @method CarbonImmutable addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealDay() Add one day to the instance (using timestamp).
* @method CarbonImmutable subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealDay() Sub one day to the instance (using timestamp).
* @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given.
* @method CarbonImmutable addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealWeek() Add one week to the instance (using timestamp).
* @method CarbonImmutable subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealWeek() Sub one week to the instance (using timestamp).
* @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given.
* @method CarbonImmutable addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealMonth() Add one month to the instance (using timestamp).
* @method CarbonImmutable subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealMonth() Sub one month to the instance (using timestamp).
* @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given.
* @method CarbonImmutable addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealQuarter() Add one quarter to the instance (using timestamp).
* @method CarbonImmutable subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealQuarter() Sub one quarter to the instance (using timestamp).
* @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given.
* @method CarbonImmutable addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealYear() Add one year to the instance (using timestamp).
* @method CarbonImmutable subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealYear() Sub one year to the instance (using timestamp).
* @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given.
* @method CarbonImmutable addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealDecade() Add one decade to the instance (using timestamp).
* @method CarbonImmutable subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealDecade() Sub one decade to the instance (using timestamp).
* @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given.
* @method CarbonImmutable addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealCentury() Add one century to the instance (using timestamp).
* @method CarbonImmutable subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealCentury() Sub one century to the instance (using timestamp).
* @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given.
* @method CarbonImmutable addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable addRealMillennium() Add one millennium to the instance (using timestamp).
* @method CarbonImmutable subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp).
* @method CarbonImmutable subRealMillennium() Sub one millennium to the instance (using timestamp).
* @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given.
* @method CarbonImmutable roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function.
* @method CarbonImmutable roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function.
* @method CarbonImmutable floorYear(float $precision = 1) Truncate the current instance year with given precision.
* @method CarbonImmutable floorYears(float $precision = 1) Truncate the current instance year with given precision.
* @method CarbonImmutable ceilYear(float $precision = 1) Ceil the current instance year with given precision.
* @method CarbonImmutable ceilYears(float $precision = 1) Ceil the current instance year with given precision.
* @method CarbonImmutable roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function.
* @method CarbonImmutable roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function.
* @method CarbonImmutable floorMonth(float $precision = 1) Truncate the current instance month with given precision.
* @method CarbonImmutable floorMonths(float $precision = 1) Truncate the current instance month with given precision.
* @method CarbonImmutable ceilMonth(float $precision = 1) Ceil the current instance month with given precision.
* @method CarbonImmutable ceilMonths(float $precision = 1) Ceil the current instance month with given precision.
* @method CarbonImmutable roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function.
* @method CarbonImmutable roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function.
* @method CarbonImmutable floorDay(float $precision = 1) Truncate the current instance day with given precision.
* @method CarbonImmutable floorDays(float $precision = 1) Truncate the current instance day with given precision.
* @method CarbonImmutable ceilDay(float $precision = 1) Ceil the current instance day with given precision.
* @method CarbonImmutable ceilDays(float $precision = 1) Ceil the current instance day with given precision.
* @method CarbonImmutable roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function.
* @method CarbonImmutable roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function.
* @method CarbonImmutable floorHour(float $precision = 1) Truncate the current instance hour with given precision.
* @method CarbonImmutable floorHours(float $precision = 1) Truncate the current instance hour with given precision.
* @method CarbonImmutable ceilHour(float $precision = 1) Ceil the current instance hour with given precision.
* @method CarbonImmutable ceilHours(float $precision = 1) Ceil the current instance hour with given precision.
* @method CarbonImmutable roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function.
* @method CarbonImmutable roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function.
* @method CarbonImmutable floorMinute(float $precision = 1) Truncate the current instance minute with given precision.
* @method CarbonImmutable floorMinutes(float $precision = 1) Truncate the current instance minute with given precision.
* @method CarbonImmutable ceilMinute(float $precision = 1) Ceil the current instance minute with given precision.
* @method CarbonImmutable ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision.
* @method CarbonImmutable roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function.
* @method CarbonImmutable roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function.
* @method CarbonImmutable floorSecond(float $precision = 1) Truncate the current instance second with given precision.
* @method CarbonImmutable floorSeconds(float $precision = 1) Truncate the current instance second with given precision.
* @method CarbonImmutable ceilSecond(float $precision = 1) Ceil the current instance second with given precision.
* @method CarbonImmutable ceilSeconds(float $precision = 1) Ceil the current instance second with given precision.
* @method CarbonImmutable roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function.
* @method CarbonImmutable roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function.
* @method CarbonImmutable floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision.
* @method CarbonImmutable floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision.
* @method CarbonImmutable ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision.
* @method CarbonImmutable ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision.
* @method CarbonImmutable roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function.
* @method CarbonImmutable roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function.
* @method CarbonImmutable floorCentury(float $precision = 1) Truncate the current instance century with given precision.
* @method CarbonImmutable floorCenturies(float $precision = 1) Truncate the current instance century with given precision.
* @method CarbonImmutable ceilCentury(float $precision = 1) Ceil the current instance century with given precision.
* @method CarbonImmutable ceilCenturies(float $precision = 1) Ceil the current instance century with given precision.
* @method CarbonImmutable roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function.
* @method CarbonImmutable roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function.
* @method CarbonImmutable floorDecade(float $precision = 1) Truncate the current instance decade with given precision.
* @method CarbonImmutable floorDecades(float $precision = 1) Truncate the current instance decade with given precision.
* @method CarbonImmutable ceilDecade(float $precision = 1) Ceil the current instance decade with given precision.
* @method CarbonImmutable ceilDecades(float $precision = 1) Ceil the current instance decade with given precision.
* @method CarbonImmutable roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function.
* @method CarbonImmutable roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function.
* @method CarbonImmutable floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision.
* @method CarbonImmutable floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision.
* @method CarbonImmutable ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision.
* @method CarbonImmutable ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision.
* @method CarbonImmutable roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function.
* @method CarbonImmutable roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function.
* @method CarbonImmutable floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision.
* @method CarbonImmutable floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision.
* @method CarbonImmutable ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision.
* @method CarbonImmutable ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision.
* @method CarbonImmutable roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function.
* @method CarbonImmutable roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function.
* @method CarbonImmutable floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision.
* @method CarbonImmutable floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision.
* @method CarbonImmutable ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision.
* @method CarbonImmutable ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision.
* @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
* @method static static|false createFromFormat(string $format, string $time, DateTimeZone|string|false|null $timezone = null) Parse a string into a new CarbonImmutable object according to the specified format.
* @method static static __set_state(array $array) https://php.net/manual/en/datetime.set-state.php
*
* </autodoc>
*/
class CarbonImmutable extends DateTimeImmutable implements CarbonInterface
{
use Date {
__clone as dateTraitClone;
}
public function __clone()
{
$this->dateTraitClone();
$this->endOfTime = false;
$this->startOfTime = false;
}
/**
* Create a very old date representing start of time.
*
* @return static
*/
public static function startOfTime(): self
{
$date = static::parse('0001-01-01')->years(self::getStartOfTimeYear());
$date->startOfTime = true;
return $date;
}
/**
* Create a very far date representing end of time.
*
* @return static
*/
public static function endOfTime(): self
{
$date = static::parse('9999-12-31 23:59:59.999999')->years(self::getEndOfTimeYear());
$date->endOfTime = true;
return $date;
}
/**
* @codeCoverageIgnore
*/
private static function getEndOfTimeYear(): int
{
if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) {
return 145261681241552;
}
// Remove if https://bugs.php.net/bug.php?id=81107 is fixed
if (version_compare(PHP_VERSION, '8.1.0-dev', '>=')) {
return 1118290769066902787;
}
return PHP_INT_MAX;
}
/**
* @codeCoverageIgnore
*/
private static function getStartOfTimeYear(): int
{
if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) {
return -135908816449551;
}
// Remove if https://bugs.php.net/bug.php?id=81107 is fixed
if (version_compare(PHP_VERSION, '8.1.0-dev', '>=')) {
return -1118290769066898816;
}
return max(PHP_INT_MIN, -9223372036854773760);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,40 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
class CarbonPeriodImmutable extends CarbonPeriod
{
/**
* Default date class of iteration items.
*
* @var string
*/
protected const DEFAULT_DATE_CLASS = CarbonImmutable::class;
/**
* Date class of iteration items.
*
* @var string
*/
protected $dateClass = CarbonImmutable::class;
/**
* Prepare the instance to be set (self if mutable to be mutated,
* copy if immutable to generate a new instance).
*
* @return static
*/
protected function copyIfImmutable()
{
return $this->constructed ? clone $this : $this;
}
}

View File

@ -0,0 +1,320 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use Carbon\Exceptions\InvalidCastException;
use Carbon\Exceptions\InvalidTimeZoneException;
use DateTimeInterface;
use DateTimeZone;
use Throwable;
class CarbonTimeZone extends DateTimeZone
{
public function __construct($timezone = null)
{
parent::__construct(static::getDateTimeZoneNameFromMixed($timezone));
}
protected static function parseNumericTimezone($timezone)
{
if ($timezone <= -100 || $timezone >= 100) {
throw new InvalidTimeZoneException('Absolute timezone offset cannot be greater than 100.');
}
return ($timezone >= 0 ? '+' : '').ltrim($timezone, '+').':00';
}
protected static function getDateTimeZoneNameFromMixed($timezone)
{
if ($timezone === null) {
return date_default_timezone_get();
}
if (\is_string($timezone)) {
$timezone = preg_replace('/^\s*([+-]\d+)(\d{2})\s*$/', '$1:$2', $timezone);
}
if (is_numeric($timezone)) {
return static::parseNumericTimezone($timezone);
}
return $timezone;
}
protected static function getDateTimeZoneFromName(&$name)
{
return @timezone_open($name = (string) static::getDateTimeZoneNameFromMixed($name));
}
/**
* Cast the current instance into the given class.
*
* @param string $className The $className::instance() method will be called to cast the current object.
*
* @return DateTimeZone
*/
public function cast(string $className)
{
if (!method_exists($className, 'instance')) {
if (is_a($className, DateTimeZone::class, true)) {
return new $className($this->getName());
}
throw new InvalidCastException("$className has not the instance() method needed to cast the date.");
}
return $className::instance($this);
}
/**
* Create a CarbonTimeZone from mixed input.
*
* @param DateTimeZone|string|int|null $object original value to get CarbonTimeZone from it.
* @param DateTimeZone|string|int|null $objectDump dump of the object for error messages.
*
* @throws InvalidTimeZoneException
*
* @return false|static
*/
public static function instance($object = null, $objectDump = null)
{
$tz = $object;
if ($tz instanceof static) {
return $tz;
}
if ($tz === null) {
return new static();
}
if (!$tz instanceof DateTimeZone) {
$tz = static::getDateTimeZoneFromName($object);
}
if ($tz !== false) {
return new static($tz->getName());
}
if (Carbon::isStrictModeEnabled()) {
throw new InvalidTimeZoneException('Unknown or bad timezone ('.($objectDump ?: $object).')');
}
return false;
}
/**
* Returns abbreviated name of the current timezone according to DST setting.
*
* @param bool $dst
*
* @return string
*/
public function getAbbreviatedName($dst = false)
{
$name = $this->getName();
foreach ($this->listAbbreviations() as $abbreviation => $zones) {
foreach ($zones as $zone) {
if ($zone['timezone_id'] === $name && $zone['dst'] == $dst) {
return $abbreviation;
}
}
}
return 'unknown';
}
/**
* @alias getAbbreviatedName
*
* Returns abbreviated name of the current timezone according to DST setting.
*
* @param bool $dst
*
* @return string
*/
public function getAbbr($dst = false)
{
return $this->getAbbreviatedName($dst);
}
/**
* Get the offset as string "sHH:MM" (such as "+00:00" or "-12:30").
*
* @param DateTimeInterface|null $date
*
* @return string
*/
public function toOffsetName(DateTimeInterface $date = null)
{
return static::getOffsetNameFromMinuteOffset(
$this->getOffset($date ?: Carbon::now($this)) / 60
);
}
/**
* Returns a new CarbonTimeZone object using the offset string instead of region string.
*
* @param DateTimeInterface|null $date
*
* @return CarbonTimeZone
*/
public function toOffsetTimeZone(DateTimeInterface $date = null)
{
return new static($this->toOffsetName($date));
}
/**
* Returns the first region string (such as "America/Toronto") that matches the current timezone or
* false if no match is found.
*
* @see timezone_name_from_abbr native PHP function.
*
* @param DateTimeInterface|null $date
* @param int $isDst
*
* @return string|false
*/
public function toRegionName(DateTimeInterface $date = null, $isDst = 1)
{
$name = $this->getName();
$firstChar = substr($name, 0, 1);
if ($firstChar !== '+' && $firstChar !== '-') {
return $name;
}
$date = $date ?: Carbon::now($this);
// Integer construction no longer supported since PHP 8
// @codeCoverageIgnoreStart
try {
$offset = @$this->getOffset($date) ?: 0;
} catch (Throwable $e) {
$offset = 0;
}
// @codeCoverageIgnoreEnd
$name = @timezone_name_from_abbr('', $offset, $isDst);
if ($name) {
return $name;
}
foreach (timezone_identifiers_list() as $timezone) {
if (Carbon::instance($date)->tz($timezone)->getOffset() === $offset) {
return $timezone;
}
}
return false;
}
/**
* Returns a new CarbonTimeZone object using the region string instead of offset string.
*
* @param DateTimeInterface|null $date
*
* @return CarbonTimeZone|false
*/
public function toRegionTimeZone(DateTimeInterface $date = null)
{
$tz = $this->toRegionName($date);
if ($tz !== false) {
return new static($tz);
}
if (Carbon::isStrictModeEnabled()) {
throw new InvalidTimeZoneException('Unknown timezone for offset '.$this->getOffset($date ?: Carbon::now($this)).' seconds.');
}
return false;
}
/**
* Cast to string (get timezone name).
*
* @return string
*/
public function __toString()
{
return $this->getName();
}
/**
* Return the type number:
*
* Type 1; A UTC offset, such as -0300
* Type 2; A timezone abbreviation, such as GMT
* Type 3: A timezone identifier, such as Europe/London
*/
public function getType(): int
{
return preg_match('/"timezone_type";i:(\d)/', serialize($this), $match) ? (int) $match[1] : 3;
}
/**
* Create a CarbonTimeZone from mixed input.
*
* @param DateTimeZone|string|int|null $object
*
* @return false|static
*/
public static function create($object = null)
{
return static::instance($object);
}
/**
* Create a CarbonTimeZone from int/float hour offset.
*
* @param float $hourOffset number of hour of the timezone shift (can be decimal).
*
* @return false|static
*/
public static function createFromHourOffset(float $hourOffset)
{
return static::createFromMinuteOffset($hourOffset * Carbon::MINUTES_PER_HOUR);
}
/**
* Create a CarbonTimeZone from int/float minute offset.
*
* @param float $minuteOffset number of total minutes of the timezone shift.
*
* @return false|static
*/
public static function createFromMinuteOffset(float $minuteOffset)
{
return static::instance(static::getOffsetNameFromMinuteOffset($minuteOffset));
}
/**
* Convert a total minutes offset into a standardized timezone offset string.
*
* @param float $minutes number of total minutes of the timezone shift.
*
* @return string
*/
public static function getOffsetNameFromMinuteOffset(float $minutes): string
{
$minutes = round($minutes);
$unsignedMinutes = abs($minutes);
return ($minutes < 0 ? '-' : '+').
str_pad((string) floor($unsignedMinutes / 60), 2, '0', STR_PAD_LEFT).
':'.
str_pad((string) ($unsignedMinutes % 60), 2, '0', STR_PAD_LEFT);
}
}

View File

@ -0,0 +1,38 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Cli;
class Invoker
{
public const CLI_CLASS_NAME = 'Carbon\\Cli';
protected function runWithCli(string $className, array $parameters): bool
{
$cli = new $className();
return $cli(...$parameters);
}
public function __invoke(...$parameters): bool
{
if (class_exists(self::CLI_CLASS_NAME)) {
return $this->runWithCli(self::CLI_CLASS_NAME, $parameters);
}
$function = (($parameters[1] ?? '') === 'install' ? ($parameters[2] ?? null) : null) ?: 'shell_exec';
$function('composer require carbon-cli/carbon-cli --no-interaction');
echo 'Installation succeeded.';
return true;
}
}

View File

@ -0,0 +1,48 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use Throwable;
class BadComparisonUnitException extends UnitException
{
/**
* The unit.
*
* @var string
*/
protected $unit;
/**
* Constructor.
*
* @param string $unit
* @param int $code
* @param Throwable|null $previous
*/
public function __construct($unit, $code = 0, Throwable $previous = null)
{
$this->unit = $unit;
parent::__construct("Bad comparison unit: '$unit'", $code, $previous);
}
/**
* Get the unit.
*
* @return string
*/
public function getUnit(): string
{
return $this->unit;
}
}

View File

@ -0,0 +1,49 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use BadMethodCallException as BaseBadMethodCallException;
use Throwable;
class BadFluentConstructorException extends BaseBadMethodCallException implements BadMethodCallException
{
/**
* The method.
*
* @var string
*/
protected $method;
/**
* Constructor.
*
* @param string $method
* @param int $code
* @param Throwable|null $previous
*/
public function __construct($method, $code = 0, Throwable $previous = null)
{
$this->method = $method;
parent::__construct(sprintf("Unknown fluent constructor '%s'.", $method), $code, $previous);
}
/**
* Get the method.
*
* @return string
*/
public function getMethod(): string
{
return $this->method;
}
}

View File

@ -0,0 +1,49 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use BadMethodCallException as BaseBadMethodCallException;
use Throwable;
class BadFluentSetterException extends BaseBadMethodCallException implements BadMethodCallException
{
/**
* The setter.
*
* @var string
*/
protected $setter;
/**
* Constructor.
*
* @param string $setter
* @param int $code
* @param Throwable|null $previous
*/
public function __construct($setter, $code = 0, Throwable $previous = null)
{
$this->setter = $setter;
parent::__construct(sprintf("Unknown fluent setter '%s'", $setter), $code, $previous);
}
/**
* Get the setter.
*
* @return string
*/
public function getSetter(): string
{
return $this->setter;
}
}

View File

@ -0,0 +1,17 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
interface BadMethodCallException extends Exception
{
//
}

View File

@ -0,0 +1,19 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use RuntimeException as BaseRuntimeException;
final class EndLessPeriodException extends BaseRuntimeException implements RuntimeException
{
//
}

View File

@ -0,0 +1,17 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
interface Exception
{
//
}

View File

@ -0,0 +1,48 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use RuntimeException as BaseRuntimeException;
use Throwable;
class ImmutableException extends BaseRuntimeException implements RuntimeException
{
/**
* The value.
*
* @var string
*/
protected $value;
/**
* Constructor.
*
* @param string $value the immutable type/value
* @param int $code
* @param Throwable|null $previous
*/
public function __construct($value, $code = 0, Throwable $previous = null)
{
$this->value = $value;
parent::__construct("$value is immutable.", $code, $previous);
}
/**
* Get the value.
*
* @return string
*/
public function getValue(): string
{
return $this->value;
}
}

View File

@ -0,0 +1,17 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
interface InvalidArgumentException extends Exception
{
//
}

View File

@ -0,0 +1,19 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use InvalidArgumentException as BaseInvalidArgumentException;
class InvalidCastException extends BaseInvalidArgumentException implements InvalidArgumentException
{
//
}

View File

@ -0,0 +1,67 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use InvalidArgumentException as BaseInvalidArgumentException;
use Throwable;
class InvalidDateException extends BaseInvalidArgumentException implements InvalidArgumentException
{
/**
* The invalid field.
*
* @var string
*/
private $field;
/**
* The invalid value.
*
* @var mixed
*/
private $value;
/**
* Constructor.
*
* @param string $field
* @param mixed $value
* @param int $code
* @param Throwable|null $previous
*/
public function __construct($field, $value, $code = 0, Throwable $previous = null)
{
$this->field = $field;
$this->value = $value;
parent::__construct($field.' : '.$value.' is not a valid value.', $code, $previous);
}
/**
* Get the invalid field.
*
* @return string
*/
public function getField()
{
return $this->field;
}
/**
* Get the invalid value.
*
* @return mixed
*/
public function getValue()
{
return $this->value;
}
}

View File

@ -0,0 +1,19 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use InvalidArgumentException as BaseInvalidArgumentException;
class InvalidFormatException extends BaseInvalidArgumentException implements InvalidArgumentException
{
//
}

View File

@ -0,0 +1,19 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use InvalidArgumentException as BaseInvalidArgumentException;
class InvalidIntervalException extends BaseInvalidArgumentException implements InvalidArgumentException
{
//
}

View File

@ -0,0 +1,19 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use InvalidArgumentException as BaseInvalidArgumentException;
class InvalidPeriodDateException extends BaseInvalidArgumentException implements InvalidArgumentException
{
//
}

View File

@ -0,0 +1,19 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use InvalidArgumentException as BaseInvalidArgumentException;
class InvalidPeriodParameterException extends BaseInvalidArgumentException implements InvalidArgumentException
{
//
}

View File

@ -0,0 +1,19 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use InvalidArgumentException as BaseInvalidArgumentException;
class InvalidTimeZoneException extends BaseInvalidArgumentException implements InvalidArgumentException
{
//
}

View File

@ -0,0 +1,19 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use InvalidArgumentException as BaseInvalidArgumentException;
class InvalidTypeException extends BaseInvalidArgumentException implements InvalidArgumentException
{
//
}

View File

@ -0,0 +1,50 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use Carbon\CarbonInterface;
use InvalidArgumentException as BaseInvalidArgumentException;
use Throwable;
class NotACarbonClassException extends BaseInvalidArgumentException implements InvalidArgumentException
{
/**
* The className.
*
* @var string
*/
protected $className;
/**
* Constructor.
*
* @param string $className
* @param int $code
* @param Throwable|null $previous
*/
public function __construct($className, $code = 0, Throwable $previous = null)
{
$this->className = $className;
parent::__construct(sprintf('Given class does not implement %s: %s', CarbonInterface::class, $className), $code, $previous);
}
/**
* Get the className.
*
* @return string
*/
public function getClassName(): string
{
return $this->className;
}
}

View File

@ -0,0 +1,19 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use InvalidArgumentException as BaseInvalidArgumentException;
class NotAPeriodException extends BaseInvalidArgumentException implements InvalidArgumentException
{
//
}

View File

@ -0,0 +1,32 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use InvalidArgumentException as BaseInvalidArgumentException;
use Throwable;
class NotLocaleAwareException extends BaseInvalidArgumentException implements InvalidArgumentException
{
/**
* Constructor.
*
* @param mixed $object
* @param int $code
* @param Throwable|null $previous
*/
public function __construct($object, $code = 0, Throwable $previous = null)
{
$dump = \is_object($object) ? \get_class($object) : \gettype($object);
parent::__construct("$dump does neither implements Symfony\Contracts\Translation\LocaleAwareInterface nor getLocale() method.", $code, $previous);
}
}

View File

@ -0,0 +1,101 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use InvalidArgumentException as BaseInvalidArgumentException;
use Throwable;
// This will extends OutOfRangeException instead of InvalidArgumentException since 3.0.0
// use OutOfRangeException as BaseOutOfRangeException;
class OutOfRangeException extends BaseInvalidArgumentException implements InvalidArgumentException
{
/**
* The unit or name of the value.
*
* @var string
*/
private $unit;
/**
* The range minimum.
*
* @var mixed
*/
private $min;
/**
* The range maximum.
*
* @var mixed
*/
private $max;
/**
* The invalid value.
*
* @var mixed
*/
private $value;
/**
* Constructor.
*
* @param string $unit
* @param mixed $min
* @param mixed $max
* @param mixed $value
* @param int $code
* @param Throwable|null $previous
*/
public function __construct($unit, $min, $max, $value, $code = 0, Throwable $previous = null)
{
$this->unit = $unit;
$this->min = $min;
$this->max = $max;
$this->value = $value;
parent::__construct("$unit must be between $min and $max, $value given", $code, $previous);
}
/**
* @return mixed
*/
public function getMax()
{
return $this->max;
}
/**
* @return mixed
*/
public function getMin()
{
return $this->min;
}
/**
* @return mixed
*/
public function getUnit()
{
return $this->unit;
}
/**
* @return mixed
*/
public function getValue()
{
return $this->value;
}
}

View File

@ -0,0 +1,88 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use InvalidArgumentException as BaseInvalidArgumentException;
use Throwable;
class ParseErrorException extends BaseInvalidArgumentException implements InvalidArgumentException
{
/**
* The expected.
*
* @var string
*/
protected $expected;
/**
* The actual.
*
* @var string
*/
protected $actual;
/**
* The help message.
*
* @var string
*/
protected $help;
/**
* Constructor.
*
* @param string $expected
* @param string $actual
* @param int $code
* @param Throwable|null $previous
*/
public function __construct($expected, $actual, $help = '', $code = 0, Throwable $previous = null)
{
$this->expected = $expected;
$this->actual = $actual;
$this->help = $help;
$actual = $actual === '' ? 'data is missing' : "get '$actual'";
parent::__construct(trim("Format expected $expected but $actual\n$help"), $code, $previous);
}
/**
* Get the expected.
*
* @return string
*/
public function getExpected(): string
{
return $this->expected;
}
/**
* Get the actual.
*
* @return string
*/
public function getActual(): string
{
return $this->actual;
}
/**
* Get the help message.
*
* @return string
*/
public function getHelp(): string
{
return $this->help;
}
}

View File

@ -0,0 +1,17 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
interface RuntimeException extends Exception
{
//
}

View File

@ -0,0 +1,19 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use InvalidArgumentException as BaseInvalidArgumentException;
class UnitException extends BaseInvalidArgumentException implements InvalidArgumentException
{
//
}

View File

@ -0,0 +1,48 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use Throwable;
class UnitNotConfiguredException extends UnitException
{
/**
* The unit.
*
* @var string
*/
protected $unit;
/**
* Constructor.
*
* @param string $unit
* @param int $code
* @param Throwable|null $previous
*/
public function __construct($unit, $code = 0, Throwable $previous = null)
{
$this->unit = $unit;
parent::__construct("Unit $unit have no configuration to get total from other units.", $code, $previous);
}
/**
* Get the unit.
*
* @return string
*/
public function getUnit(): string
{
return $this->unit;
}
}

View File

@ -0,0 +1,49 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use InvalidArgumentException as BaseInvalidArgumentException;
use Throwable;
class UnknownGetterException extends BaseInvalidArgumentException implements InvalidArgumentException
{
/**
* The getter.
*
* @var string
*/
protected $getter;
/**
* Constructor.
*
* @param string $getter getter name
* @param int $code
* @param Throwable|null $previous
*/
public function __construct($getter, $code = 0, Throwable $previous = null)
{
$this->getter = $getter;
parent::__construct("Unknown getter '$getter'", $code, $previous);
}
/**
* Get the getter.
*
* @return string
*/
public function getGetter(): string
{
return $this->getter;
}
}

View File

@ -0,0 +1,49 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use BadMethodCallException as BaseBadMethodCallException;
use Throwable;
class UnknownMethodException extends BaseBadMethodCallException implements BadMethodCallException
{
/**
* The method.
*
* @var string
*/
protected $method;
/**
* Constructor.
*
* @param string $method
* @param int $code
* @param Throwable|null $previous
*/
public function __construct($method, $code = 0, Throwable $previous = null)
{
$this->method = $method;
parent::__construct("Method $method does not exist.", $code, $previous);
}
/**
* Get the method.
*
* @return string
*/
public function getMethod(): string
{
return $this->method;
}
}

View File

@ -0,0 +1,49 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use InvalidArgumentException as BaseInvalidArgumentException;
use Throwable;
class UnknownSetterException extends BaseInvalidArgumentException implements BadMethodCallException
{
/**
* The setter.
*
* @var string
*/
protected $setter;
/**
* Constructor.
*
* @param string $setter setter name
* @param int $code
* @param Throwable|null $previous
*/
public function __construct($setter, $code = 0, Throwable $previous = null)
{
$this->setter = $setter;
parent::__construct("Unknown setter '$setter'", $code, $previous);
}
/**
* Get the setter.
*
* @return string
*/
public function getSetter(): string
{
return $this->setter;
}
}

View File

@ -0,0 +1,48 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use Throwable;
class UnknownUnitException extends UnitException
{
/**
* The unit.
*
* @var string
*/
protected $unit;
/**
* Constructor.
*
* @param string $unit
* @param int $code
* @param Throwable|null $previous
*/
public function __construct($unit, $code = 0, Throwable $previous = null)
{
$this->unit = $unit;
parent::__construct("Unknown unit '$unit'.", $code, $previous);
}
/**
* Get the unit.
*
* @return string
*/
public function getUnit(): string
{
return $this->unit;
}
}

View File

@ -0,0 +1,19 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon\Exceptions;
use RuntimeException as BaseRuntimeException;
class UnreachableException extends BaseRuntimeException implements RuntimeException
{
//
}

View File

@ -0,0 +1,326 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use Closure;
use DateTimeInterface;
use ReflectionMethod;
/**
* A factory to generate Carbon instances with common settings.
*
* <autodoc generated by `composer phpdoc`>
*
* @method bool canBeCreatedFromFormat($date, $format) Checks if the (date)time string is in a given format and valid to create a
* new instance.
* @method Carbon|false create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) Create a new Carbon instance from a specific date and time.
* If any of $year, $month or $day are set to null their now() values will
* be used.
* If $hour is null it will be set to its now() value and the default
* values for $minute and $second will be their now() values.
* If $hour is not null then the default values for $minute and $second
* will be 0.
* @method Carbon createFromDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to now.
* @method Carbon|false createFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format.
* @method Carbon|false createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()).
* @method Carbon|false createFromLocaleFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific format and a string in a given language.
* @method Carbon|false createFromLocaleIsoFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific ISO format and a string in a given language.
* @method Carbon createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) Create a Carbon instance from just a time. The date portion is set to today.
* @method Carbon createFromTimeString($time, $tz = null) Create a Carbon instance from a time string. The date portion is set to today.
* @method Carbon createFromTimestamp($timestamp, $tz = null) Create a Carbon instance from a timestamp and set the timezone (use default one if not specified).
* Timestamp input can be given as int, float or a string containing one or more numbers.
* @method Carbon createFromTimestampMs($timestamp, $tz = null) Create a Carbon instance from a timestamp in milliseconds.
* Timestamp input can be given as int, float or a string containing one or more numbers.
* @method Carbon createFromTimestampMsUTC($timestamp) Create a Carbon instance from a timestamp in milliseconds.
* Timestamp input can be given as int, float or a string containing one or more numbers.
* @method Carbon createFromTimestampUTC($timestamp) Create a Carbon instance from an timestamp keeping the timezone to UTC.
* Timestamp input can be given as int, float or a string containing one or more numbers.
* @method Carbon createMidnightDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to midnight.
* @method Carbon|false createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) Create a new safe Carbon instance from a specific date and time.
* If any of $year, $month or $day are set to null their now() values will
* be used.
* If $hour is null it will be set to its now() value and the default
* values for $minute and $second will be their now() values.
* If $hour is not null then the default values for $minute and $second
* will be 0.
* If one of the set values is not valid, an InvalidDateException
* will be thrown.
* @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new Carbon instance from a specific date and time using strict validation.
* @method Carbon disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* @method Carbon enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* @method mixed executeWithLocale($locale, $func) Set the current locale to the given, execute the passed function, reset the locale to previous one,
* then return the result of the closure (or null if the closure was void).
* @method Carbon fromSerialized($value) Create an instance from a serialized string.
* @method void genericMacro($macro, $priority = 0) Register a custom macro.
* @method array getAvailableLocales() Returns the list of internally available locales and already loaded custom locales.
* (It will ignore custom translator dynamic loading.)
* @method Language[] getAvailableLocalesInfo() Returns list of Language object for each available locale. This object allow you to get the ISO name, native
* name, region and variant of the locale.
* @method array getDays() Get the days of the week
* @method string|null getFallbackLocale() Get the fallback locale.
* @method array getFormatsToIsoReplacements() List of replacements from date() format to isoFormat().
* @method int getHumanDiffOptions() Return default humanDiff() options (merged flags as integer).
* @method array getIsoUnits() Returns list of locale units for ISO formatting.
* @method array getLastErrors() {@inheritdoc}
* @method string getLocale() Get the current translator locale.
* @method callable|null getMacro($name) Get the raw callable macro registered globally for a given name.
* @method int getMidDayAt() get midday/noon hour
* @method Closure|Carbon getTestNow() Get the Carbon instance (real or mock) to be returned when a "now"
* instance is created.
* @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision.
* @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key.
* @method \Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use.
* @method int getWeekEndsAt() Get the last day of week
* @method int getWeekStartsAt() Get the first day of week
* @method array getWeekendDays() Get weekend days
* @method bool hasFormat($date, $format) Checks if the (date)time string is in a given format.
* @method bool hasFormatWithModifiers($date, $format) Checks if the (date)time string is in a given format.
* @method bool hasMacro($name) Checks if macro is registered globally.
* @method bool hasRelativeKeywords($time) Determine if a time string will produce a relative date.
* @method bool hasTestNow() Determine if there is a valid test instance set. A valid test instance
* is anything that is not null.
* @method Carbon instance($date) Create a Carbon instance from a DateTime one.
* @method bool isImmutable() Returns true if the current class/instance is immutable.
* @method bool isModifiableUnit($unit) Returns true if a property can be changed via setter.
* @method bool isMutable() Returns true if the current class/instance is mutable.
* @method bool isStrictModeEnabled() Returns true if the strict mode is globally in use, false else.
* (It can be overridden in specific instances.)
* @method bool localeHasDiffOneDayWords($locale) Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow).
* Support is considered enabled if the 3 words are translated in the given locale.
* @method bool localeHasDiffSyntax($locale) Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after).
* Support is considered enabled if the 4 sentences are translated in the given locale.
* @method bool localeHasDiffTwoDayWords($locale) Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow).
* Support is considered enabled if the 2 words are translated in the given locale.
* @method bool localeHasPeriodSyntax($locale) Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X).
* Support is considered enabled if the 4 sentences are translated in the given locale.
* @method bool localeHasShortUnits($locale) Returns true if the given locale is internally supported and has short-units support.
* Support is considered enabled if either year, day or hour has a short variant translated.
* @method void macro($name, $macro) Register a custom macro.
* @method Carbon|null make($var) Make a Carbon instance from given variable if possible.
* Always return a new instance. Parse only strings and only these likely to be dates (skip intervals
* and recurrences). Throw an exception for invalid format, but otherwise return null.
* @method Carbon maxValue() Create a Carbon instance for the greatest supported date.
* @method Carbon minValue() Create a Carbon instance for the lowest supported date.
* @method void mixin($mixin) Mix another object into the class.
* @method Carbon now($tz = null) Get a Carbon instance for the current date and time.
* @method Carbon parse($time = null, $tz = null) Create a carbon instance from a string.
* This is an alias for the constructor that allows better fluent syntax
* as it allows you to do Carbon::parse('Monday next week')->fn() rather
* than (new Carbon('Monday next week'))->fn().
* @method Carbon parseFromLocale($time, $locale = null, $tz = null) Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.).
* @method string pluralUnit(string $unit) Returns standardized plural of a given singular/plural unit name (in English).
* @method Carbon|false rawCreateFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format.
* @method Carbon rawParse($time = null, $tz = null) Create a carbon instance from a string.
* This is an alias for the constructor that allows better fluent syntax
* as it allows you to do Carbon::parse('Monday next week')->fn() rather
* than (new Carbon('Monday next week'))->fn().
* @method Carbon resetMacros() Remove all macros and generic macros.
* @method void resetMonthsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants
* are available for quarters, years, decade, centuries, millennia (singular and plural forms).
* @method void resetToStringFormat() Reset the format used to the default when type juggling a Carbon instance to a string
* @method void resetYearsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants
* are available for quarters, years, decade, centuries, millennia (singular and plural forms).
* @method void serializeUsing($callback) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather transform Carbon object before the serialization.
* JSON serialize all Carbon instances using the given callback.
* @method Carbon setFallbackLocale($locale) Set the fallback locale.
* @method Carbon setHumanDiffOptions($humanDiffOptions) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* @method bool setLocale($locale) Set the current translator locale and indicate if the source locale file exists.
* Pass 'auto' as locale to use closest language from the current LC_TIME locale.
* @method void setMidDayAt($hour) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather consider mid-day is always 12pm, then if you need to test if it's an other
* hour, test it explicitly:
* $date->format('G') == 13
* or to set explicitly to a given hour:
* $date->setTime(13, 0, 0, 0)
* Set midday/noon hour
* @method Carbon setTestNow($testNow = null) Set a Carbon instance (real or mock) to be returned when a "now"
* instance is created. The provided instance will be returned
* specifically under the following conditions:
* - A call to the static now() method, ex. Carbon::now()
* - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null)
* - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now')
* - When a string containing the desired time is passed to Carbon::parse().
* Note the timezone parameter was left out of the examples above and
* has no affect as the mock value will be returned regardless of its value.
* Only the moment is mocked with setTestNow(), the timezone will still be the one passed
* as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()).
* To clear the test instance call this method using the default
* parameter of null.
* /!\ Use this method for unit tests only.
* @method Carbon setTestNowAndTimezone($testNow = null, $tz = null) Set a Carbon instance (real or mock) to be returned when a "now"
* instance is created. The provided instance will be returned
* specifically under the following conditions:
* - A call to the static now() method, ex. Carbon::now()
* - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null)
* - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now')
* - When a string containing the desired time is passed to Carbon::parse().
* It will also align default timezone (e.g. call date_default_timezone_set()) with
* the second argument or if null, with the timezone of the given date object.
* To clear the test instance call this method using the default
* parameter of null.
* /!\ Use this method for unit tests only.
* @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather let Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and
* use other method or custom format passed to format() method if you need to dump another string
* format.
* Set the default format used when type juggling a Carbon instance to a string.
* @method void setTranslator(TranslatorInterface $translator) Set the default translator instance to use.
* @method Carbon setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use UTF-8 language packages on every machine.
* Set if UTF8 will be used for localized date/time.
* @method void setWeekEndsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek
* or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the
* start of week according to current locale selected and implicitly the end of week.
* Set the last day of week
* @method void setWeekStartsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the
* 'first_day_of_week' locale setting to change the start of week according to current locale
* selected and implicitly the end of week.
* Set the first day of week
* @method void setWeekendDays($days) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather consider week-end is always saturday and sunday, and if you have some custom
* week-end days to handle, give to those days an other name and create a macro for them:
* ```
* Carbon::macro('isDayOff', function ($date) {
* return $date->isSunday() || $date->isMonday();
* });
* Carbon::macro('isNotDayOff', function ($date) {
* return !$date->isDayOff();
* });
* if ($someDate->isDayOff()) ...
* if ($someDate->isNotDayOff()) ...
* // Add 5 not-off days
* $count = 5;
* while ($someDate->isDayOff() || ($count-- > 0)) {
* $someDate->addDay();
* }
* ```
* Set weekend days
* @method bool shouldOverflowMonths() Get the month overflow global behavior (can be overridden in specific instances).
* @method bool shouldOverflowYears() Get the month overflow global behavior (can be overridden in specific instances).
* @method string singularUnit(string $unit) Returns standardized singular of a given singular/plural unit name (in English).
* @method Carbon today($tz = null) Create a Carbon instance for today.
* @method Carbon tomorrow($tz = null) Create a Carbon instance for tomorrow.
* @method string translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) Translate a time string from a locale to an other.
* @method string translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null) Translate using translation string or callback available.
* @method void useMonthsOverflow($monthsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants
* are available for quarters, years, decade, centuries, millennia (singular and plural forms).
* @method Carbon useStrictMode($strictModeEnabled = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* @method void useYearsOverflow($yearsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants
* are available for quarters, years, decade, centuries, millennia (singular and plural forms).
* @method mixed withTestNow($testNow, $callback) Temporarily sets a static date to be used within the callback.
* Using setTestNow to set the date, executing the callback, then
* clearing the test instance.
* /!\ Use this method for unit tests only.
* @method Carbon yesterday($tz = null) Create a Carbon instance for yesterday.
*
* </autodoc>
*/
class Factory
{
protected $className = Carbon::class;
protected $settings = [];
public function __construct(array $settings = [], ?string $className = null)
{
if ($className) {
$this->className = $className;
}
$this->settings = $settings;
}
public function getClassName()
{
return $this->className;
}
public function setClassName(string $className)
{
$this->className = $className;
return $this;
}
public function className(string $className = null)
{
return $className === null ? $this->getClassName() : $this->setClassName($className);
}
public function getSettings()
{
return $this->settings;
}
public function setSettings(array $settings)
{
$this->settings = $settings;
return $this;
}
public function settings(array $settings = null)
{
return $settings === null ? $this->getSettings() : $this->setSettings($settings);
}
public function mergeSettings(array $settings)
{
$this->settings = array_merge($this->settings, $settings);
return $this;
}
public function __call($name, $arguments)
{
$method = new ReflectionMethod($this->className, $name);
$settings = $this->settings;
if ($settings && isset($settings['timezone'])) {
$tzParameters = array_filter($method->getParameters(), function ($parameter) {
return \in_array($parameter->getName(), ['tz', 'timezone'], true);
});
if (isset($arguments[0]) && \in_array($name, ['instance', 'make', 'create', 'parse'], true)) {
if ($arguments[0] instanceof DateTimeInterface) {
$settings['innerTimezone'] = $settings['timezone'];
} elseif (\is_string($arguments[0]) && date_parse($arguments[0])['is_localtime']) {
unset($settings['timezone'], $settings['innerTimezone']);
}
} elseif (\count($tzParameters)) {
array_splice($arguments, key($tzParameters), 0, [$settings['timezone']]);
unset($settings['timezone']);
}
}
$result = $this->className::$name(...$arguments);
return $result instanceof CarbonInterface && !empty($settings)
? $result->settings($settings)
: $result;
}
}

View File

@ -0,0 +1,259 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Carbon;
use Closure;
use DateTimeImmutable;
use DateTimeZone;
use Psr\Clock\ClockInterface;
/**
* A factory to generate CarbonImmutable instances with common settings.
*
* <autodoc generated by `composer phpdoc`>
*
* @method bool canBeCreatedFromFormat($date, $format) Checks if the (date)time string is in a given format and valid to create a
* new instance.
* @method CarbonImmutable|false create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) Create a new Carbon instance from a specific date and time.
* If any of $year, $month or $day are set to null their now() values will
* be used.
* If $hour is null it will be set to its now() value and the default
* values for $minute and $second will be their now() values.
* If $hour is not null then the default values for $minute and $second
* will be 0.
* @method CarbonImmutable createFromDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to now.
* @method CarbonImmutable|false createFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format.
* @method CarbonImmutable|false createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()).
* @method CarbonImmutable|false createFromLocaleFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific format and a string in a given language.
* @method CarbonImmutable|false createFromLocaleIsoFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific ISO format and a string in a given language.
* @method CarbonImmutable createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) Create a Carbon instance from just a time. The date portion is set to today.
* @method CarbonImmutable createFromTimeString($time, $tz = null) Create a Carbon instance from a time string. The date portion is set to today.
* @method CarbonImmutable createFromTimestamp($timestamp, $tz = null) Create a Carbon instance from a timestamp and set the timezone (use default one if not specified).
* Timestamp input can be given as int, float or a string containing one or more numbers.
* @method CarbonImmutable createFromTimestampMs($timestamp, $tz = null) Create a Carbon instance from a timestamp in milliseconds.
* Timestamp input can be given as int, float or a string containing one or more numbers.
* @method CarbonImmutable createFromTimestampMsUTC($timestamp) Create a Carbon instance from a timestamp in milliseconds.
* Timestamp input can be given as int, float or a string containing one or more numbers.
* @method CarbonImmutable createFromTimestampUTC($timestamp) Create a Carbon instance from an timestamp keeping the timezone to UTC.
* Timestamp input can be given as int, float or a string containing one or more numbers.
* @method CarbonImmutable createMidnightDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to midnight.
* @method CarbonImmutable|false createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) Create a new safe Carbon instance from a specific date and time.
* If any of $year, $month or $day are set to null their now() values will
* be used.
* If $hour is null it will be set to its now() value and the default
* values for $minute and $second will be their now() values.
* If $hour is not null then the default values for $minute and $second
* will be 0.
* If one of the set values is not valid, an InvalidDateException
* will be thrown.
* @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new Carbon instance from a specific date and time using strict validation.
* @method CarbonImmutable disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* @method CarbonImmutable enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* @method mixed executeWithLocale($locale, $func) Set the current locale to the given, execute the passed function, reset the locale to previous one,
* then return the result of the closure (or null if the closure was void).
* @method CarbonImmutable fromSerialized($value) Create an instance from a serialized string.
* @method void genericMacro($macro, $priority = 0) Register a custom macro.
* @method array getAvailableLocales() Returns the list of internally available locales and already loaded custom locales.
* (It will ignore custom translator dynamic loading.)
* @method Language[] getAvailableLocalesInfo() Returns list of Language object for each available locale. This object allow you to get the ISO name, native
* name, region and variant of the locale.
* @method array getDays() Get the days of the week
* @method string|null getFallbackLocale() Get the fallback locale.
* @method array getFormatsToIsoReplacements() List of replacements from date() format to isoFormat().
* @method int getHumanDiffOptions() Return default humanDiff() options (merged flags as integer).
* @method array getIsoUnits() Returns list of locale units for ISO formatting.
* @method array getLastErrors() {@inheritdoc}
* @method string getLocale() Get the current translator locale.
* @method callable|null getMacro($name) Get the raw callable macro registered globally for a given name.
* @method int getMidDayAt() get midday/noon hour
* @method Closure|CarbonImmutable getTestNow() Get the Carbon instance (real or mock) to be returned when a "now"
* instance is created.
* @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision.
* @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key.
* @method \Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use.
* @method int getWeekEndsAt() Get the last day of week
* @method int getWeekStartsAt() Get the first day of week
* @method array getWeekendDays() Get weekend days
* @method bool hasFormat($date, $format) Checks if the (date)time string is in a given format.
* @method bool hasFormatWithModifiers($date, $format) Checks if the (date)time string is in a given format.
* @method bool hasMacro($name) Checks if macro is registered globally.
* @method bool hasRelativeKeywords($time) Determine if a time string will produce a relative date.
* @method bool hasTestNow() Determine if there is a valid test instance set. A valid test instance
* is anything that is not null.
* @method CarbonImmutable instance($date) Create a Carbon instance from a DateTime one.
* @method bool isImmutable() Returns true if the current class/instance is immutable.
* @method bool isModifiableUnit($unit) Returns true if a property can be changed via setter.
* @method bool isMutable() Returns true if the current class/instance is mutable.
* @method bool isStrictModeEnabled() Returns true if the strict mode is globally in use, false else.
* (It can be overridden in specific instances.)
* @method bool localeHasDiffOneDayWords($locale) Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow).
* Support is considered enabled if the 3 words are translated in the given locale.
* @method bool localeHasDiffSyntax($locale) Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after).
* Support is considered enabled if the 4 sentences are translated in the given locale.
* @method bool localeHasDiffTwoDayWords($locale) Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow).
* Support is considered enabled if the 2 words are translated in the given locale.
* @method bool localeHasPeriodSyntax($locale) Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X).
* Support is considered enabled if the 4 sentences are translated in the given locale.
* @method bool localeHasShortUnits($locale) Returns true if the given locale is internally supported and has short-units support.
* Support is considered enabled if either year, day or hour has a short variant translated.
* @method void macro($name, $macro) Register a custom macro.
* @method CarbonImmutable|null make($var) Make a Carbon instance from given variable if possible.
* Always return a new instance. Parse only strings and only these likely to be dates (skip intervals
* and recurrences). Throw an exception for invalid format, but otherwise return null.
* @method CarbonImmutable maxValue() Create a Carbon instance for the greatest supported date.
* @method CarbonImmutable minValue() Create a Carbon instance for the lowest supported date.
* @method void mixin($mixin) Mix another object into the class.
* @method CarbonImmutable parse($time = null, $tz = null) Create a carbon instance from a string.
* This is an alias for the constructor that allows better fluent syntax
* as it allows you to do Carbon::parse('Monday next week')->fn() rather
* than (new Carbon('Monday next week'))->fn().
* @method CarbonImmutable parseFromLocale($time, $locale = null, $tz = null) Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.).
* @method string pluralUnit(string $unit) Returns standardized plural of a given singular/plural unit name (in English).
* @method CarbonImmutable|false rawCreateFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format.
* @method CarbonImmutable rawParse($time = null, $tz = null) Create a carbon instance from a string.
* This is an alias for the constructor that allows better fluent syntax
* as it allows you to do Carbon::parse('Monday next week')->fn() rather
* than (new Carbon('Monday next week'))->fn().
* @method CarbonImmutable resetMacros() Remove all macros and generic macros.
* @method void resetMonthsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants
* are available for quarters, years, decade, centuries, millennia (singular and plural forms).
* @method void resetToStringFormat() Reset the format used to the default when type juggling a Carbon instance to a string
* @method void resetYearsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants
* are available for quarters, years, decade, centuries, millennia (singular and plural forms).
* @method void serializeUsing($callback) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather transform Carbon object before the serialization.
* JSON serialize all Carbon instances using the given callback.
* @method CarbonImmutable setFallbackLocale($locale) Set the fallback locale.
* @method CarbonImmutable setHumanDiffOptions($humanDiffOptions) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* @method bool setLocale($locale) Set the current translator locale and indicate if the source locale file exists.
* Pass 'auto' as locale to use closest language from the current LC_TIME locale.
* @method void setMidDayAt($hour) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather consider mid-day is always 12pm, then if you need to test if it's an other
* hour, test it explicitly:
* $date->format('G') == 13
* or to set explicitly to a given hour:
* $date->setTime(13, 0, 0, 0)
* Set midday/noon hour
* @method CarbonImmutable setTestNow($testNow = null) Set a Carbon instance (real or mock) to be returned when a "now"
* instance is created. The provided instance will be returned
* specifically under the following conditions:
* - A call to the static now() method, ex. Carbon::now()
* - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null)
* - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now')
* - When a string containing the desired time is passed to Carbon::parse().
* Note the timezone parameter was left out of the examples above and
* has no affect as the mock value will be returned regardless of its value.
* Only the moment is mocked with setTestNow(), the timezone will still be the one passed
* as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()).
* To clear the test instance call this method using the default
* parameter of null.
* /!\ Use this method for unit tests only.
* @method CarbonImmutable setTestNowAndTimezone($testNow = null, $tz = null) Set a Carbon instance (real or mock) to be returned when a "now"
* instance is created. The provided instance will be returned
* specifically under the following conditions:
* - A call to the static now() method, ex. Carbon::now()
* - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null)
* - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now')
* - When a string containing the desired time is passed to Carbon::parse().
* It will also align default timezone (e.g. call date_default_timezone_set()) with
* the second argument or if null, with the timezone of the given date object.
* To clear the test instance call this method using the default
* parameter of null.
* /!\ Use this method for unit tests only.
* @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather let Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and
* use other method or custom format passed to format() method if you need to dump another string
* format.
* Set the default format used when type juggling a Carbon instance to a string.
* @method void setTranslator(TranslatorInterface $translator) Set the default translator instance to use.
* @method CarbonImmutable setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use UTF-8 language packages on every machine.
* Set if UTF8 will be used for localized date/time.
* @method void setWeekEndsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek
* or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the
* start of week according to current locale selected and implicitly the end of week.
* Set the last day of week
* @method void setWeekStartsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the
* 'first_day_of_week' locale setting to change the start of week according to current locale
* selected and implicitly the end of week.
* Set the first day of week
* @method void setWeekendDays($days) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather consider week-end is always saturday and sunday, and if you have some custom
* week-end days to handle, give to those days an other name and create a macro for them:
* ```
* Carbon::macro('isDayOff', function ($date) {
* return $date->isSunday() || $date->isMonday();
* });
* Carbon::macro('isNotDayOff', function ($date) {
* return !$date->isDayOff();
* });
* if ($someDate->isDayOff()) ...
* if ($someDate->isNotDayOff()) ...
* // Add 5 not-off days
* $count = 5;
* while ($someDate->isDayOff() || ($count-- > 0)) {
* $someDate->addDay();
* }
* ```
* Set weekend days
* @method bool shouldOverflowMonths() Get the month overflow global behavior (can be overridden in specific instances).
* @method bool shouldOverflowYears() Get the month overflow global behavior (can be overridden in specific instances).
* @method string singularUnit(string $unit) Returns standardized singular of a given singular/plural unit name (in English).
* @method CarbonImmutable today($tz = null) Create a Carbon instance for today.
* @method CarbonImmutable tomorrow($tz = null) Create a Carbon instance for tomorrow.
* @method string translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) Translate a time string from a locale to an other.
* @method string translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null) Translate using translation string or callback available.
* @method void useMonthsOverflow($monthsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants
* are available for quarters, years, decade, centuries, millennia (singular and plural forms).
* @method CarbonImmutable useStrictMode($strictModeEnabled = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* @method void useYearsOverflow($yearsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
* You should rather use the ->settings() method.
* Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants
* are available for quarters, years, decade, centuries, millennia (singular and plural forms).
* @method mixed withTestNow($testNow, $callback) Temporarily sets a static date to be used within the callback.
* Using setTestNow to set the date, executing the callback, then
* clearing the test instance.
* /!\ Use this method for unit tests only.
* @method CarbonImmutable yesterday($tz = null) Create a Carbon instance for yesterday.
*
* </autodoc>
*/
class FactoryImmutable extends Factory implements ClockInterface
{
protected $className = CarbonImmutable::class;
/**
* Get a Carbon instance for the current date and time.
*
* @param DateTimeZone|string|int|null $tz
*
* @return CarbonImmutable
*/
public function now($tz = null): DateTimeImmutable
{
$className = $this->className;
return new $className(null, $tz);
}
}

View File

@ -0,0 +1,15 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Unknown default region, use the first alphabetically.
*/
return require __DIR__.'/aa_DJ.php';

View File

@ -0,0 +1,44 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - Ge'ez Frontier Foundation locales@geez.org
*/
return array_replace_recursive(require __DIR__.'/en.php', [
'formats' => [
'L' => 'DD.MM.YYYY',
],
'months' => ['Qunxa Garablu', 'Kudo', 'Ciggilta Kudo', 'Agda Baxisso', 'Caxah Alsa', 'Qasa Dirri', 'Qado Dirri', 'Liiqen', 'Waysu', 'Diteli', 'Ximoli', 'Kaxxa Garablu'],
'months_short' => ['qun', 'nah', 'cig', 'agd', 'cax', 'qas', 'qad', 'leq', 'way', 'dit', 'xim', 'kax'],
'weekdays' => ['Acaada', 'Etleeni', 'Talaata', 'Arbaqa', 'Kamiisi', 'Gumqata', 'Sabti'],
'weekdays_short' => ['aca', 'etl', 'tal', 'arb', 'kam', 'gum', 'sab'],
'weekdays_min' => ['aca', 'etl', 'tal', 'arb', 'kam', 'gum', 'sab'],
'first_day_of_week' => 6,
'day_of_first_week_of_year' => 1,
'meridiem' => ['saaku', 'carra'],
'year' => ':count gaqambo', // less reliable
'y' => ':count gaqambo', // less reliable
'a_year' => ':count gaqambo', // less reliable
'month' => ':count àlsa',
'm' => ':count àlsa',
'a_month' => ':count àlsa',
'day' => ':count saaku', // less reliable
'd' => ':count saaku', // less reliable
'a_day' => ':count saaku', // less reliable
'hour' => ':count ayti', // less reliable
'h' => ':count ayti', // less reliable
'a_hour' => ':count ayti', // less reliable
]);

View File

@ -0,0 +1,28 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - Ge'ez Frontier Foundation locales@geez.org
*/
return array_replace_recursive(require __DIR__.'/en.php', [
'formats' => [
'L' => 'DD/MM/YYYY',
],
'months' => ['Qunxa Garablu', 'Naharsi Kudo', 'Ciggilta Kudo', 'Agda Baxisso', 'Caxah Alsa', 'Qasa Dirri', 'Qado Dirri', 'Leqeeni', 'Waysu', 'Diteli', 'Ximoli', 'Kaxxa Garablu'],
'months_short' => ['Qun', 'Nah', 'Cig', 'Agd', 'Cax', 'Qas', 'Qad', 'Leq', 'Way', 'Dit', 'Xim', 'Kax'],
'weekdays' => ['Acaada', 'Etleeni', 'Talaata', 'Arbaqa', 'Kamiisi', 'Gumqata', 'Sabti'],
'weekdays_short' => ['Aca', 'Etl', 'Tal', 'Arb', 'Kam', 'Gum', 'Sab'],
'weekdays_min' => ['Aca', 'Etl', 'Tal', 'Arb', 'Kam', 'Gum', 'Sab'],
'first_day_of_week' => 1,
'day_of_first_week_of_year' => 1,
'meridiem' => ['saaku', 'carra'],
]);

View File

@ -0,0 +1,28 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - Ge'ez Frontier Foundation locales@geez.org
*/
return array_replace_recursive(require __DIR__.'/en.php', [
'formats' => [
'L' => 'DD/MM/YYYY',
],
'months' => ['Qunxa Garablu', 'Naharsi Kudo', 'Ciggilta Kudo', 'Agda Baxisso', 'Caxah Alsa', 'Qasa Dirri', 'Qado Dirri', 'Leqeeni', 'Waysu', 'Diteli', 'Ximoli', 'Kaxxa Garablu'],
'months_short' => ['Qun', 'Nah', 'Cig', 'Agd', 'Cax', 'Qas', 'Qad', 'Leq', 'Way', 'Dit', 'Xim', 'Kax'],
'weekdays' => ['Naba Sambat', 'Sani', 'Salus', 'Rabuq', 'Camus', 'Jumqata', 'Qunxa Sambat'],
'weekdays_short' => ['Nab', 'San', 'Sal', 'Rab', 'Cam', 'Jum', 'Qun'],
'weekdays_min' => ['Nab', 'San', 'Sal', 'Rab', 'Cam', 'Jum', 'Qun'],
'first_day_of_week' => 1,
'day_of_first_week_of_year' => 1,
'meridiem' => ['saaku', 'carra'],
]);

View File

@ -0,0 +1,27 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - Ge'ez Frontier Foundation locales@geez.org
*/
return array_replace_recursive(require __DIR__.'/en.php', [
'formats' => [
'L' => 'DD/MM/YYYY',
],
'months' => ['Qunxa Garablu', 'Kudo', 'Ciggilta Kudo', 'Agda Baxisso', 'Caxah Alsa', 'Qasa Dirri', 'Qado Dirri', 'Liiqen', 'Waysu', 'Diteli', 'Ximoli', 'Kaxxa Garablu'],
'months_short' => ['Qun', 'Kud', 'Cig', 'Agd', 'Cax', 'Qas', 'Qad', 'Leq', 'Way', 'Dit', 'Xim', 'Kax'],
'weekdays' => ['Acaada', 'Etleeni', 'Talaata', 'Arbaqa', 'Kamiisi', 'Gumqata', 'Sabti'],
'weekdays_short' => ['Aca', 'Etl', 'Tal', 'Arb', 'Kam', 'Gum', 'Sab'],
'weekdays_min' => ['Aca', 'Etl', 'Tal', 'Arb', 'Kam', 'Gum', 'Sab'],
'day_of_first_week_of_year' => 1,
'meridiem' => ['saaku', 'carra'],
]);

View File

@ -0,0 +1,79 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - François B
* - JD Isaacks
* - Pierre du Plessis
*/
return [
'year' => ':count jaar',
'a_year' => '\'n jaar|:count jaar',
'y' => ':count j.',
'month' => ':count maand|:count maande',
'a_month' => '\'n maand|:count maande',
'm' => ':count maa.',
'week' => ':count week|:count weke',
'a_week' => '\'n week|:count weke',
'w' => ':count w.',
'day' => ':count dag|:count dae',
'a_day' => '\'n dag|:count dae',
'd' => ':count d.',
'hour' => ':count uur',
'a_hour' => '\'n uur|:count uur',
'h' => ':count u.',
'minute' => ':count minuut|:count minute',
'a_minute' => '\'n minuut|:count minute',
'min' => ':count min.',
'second' => ':count sekond|:count sekondes',
'a_second' => '\'n paar sekondes|:count sekondes',
's' => ':count s.',
'ago' => ':time gelede',
'from_now' => 'oor :time',
'after' => ':time na',
'before' => ':time voor',
'diff_now' => 'Nou',
'diff_today' => 'Vandag',
'diff_today_regexp' => 'Vandag(?:\\s+om)?',
'diff_yesterday' => 'Gister',
'diff_yesterday_regexp' => 'Gister(?:\\s+om)?',
'diff_tomorrow' => 'Môre',
'diff_tomorrow_regexp' => 'Môre(?:\\s+om)?',
'formats' => [
'LT' => 'HH:mm',
'LTS' => 'HH:mm:ss',
'L' => 'DD/MM/YYYY',
'LL' => 'D MMMM YYYY',
'LLL' => 'D MMMM YYYY HH:mm',
'LLLL' => 'dddd, D MMMM YYYY HH:mm',
],
'calendar' => [
'sameDay' => '[Vandag om] LT',
'nextDay' => '[Môre om] LT',
'nextWeek' => 'dddd [om] LT',
'lastDay' => '[Gister om] LT',
'lastWeek' => '[Laas] dddd [om] LT',
'sameElse' => 'L',
],
'ordinal' => function ($number) {
return $number.(($number === 1 || $number === 8 || $number >= 20) ? 'ste' : 'de');
},
'meridiem' => ['VM', 'NM'],
'months' => ['Januarie', 'Februarie', 'Maart', 'April', 'Mei', 'Junie', 'Julie', 'Augustus', 'September', 'Oktober', 'November', 'Desember'],
'months_short' => ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'],
'weekdays' => ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'],
'weekdays_short' => ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'],
'weekdays_min' => ['So', 'Ma', 'Di', 'Wo', 'Do', 'Vr', 'Sa'],
'first_day_of_week' => 1,
'day_of_first_week_of_year' => 4,
'list' => [', ', ' en '],
];

View File

@ -0,0 +1,28 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array_replace_recursive(require __DIR__.'/af.php', [
'meridiem' => ['v', 'n'],
'weekdays' => ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'],
'weekdays_short' => ['So.', 'Ma.', 'Di.', 'Wo.', 'Do.', 'Vr.', 'Sa.'],
'weekdays_min' => ['So.', 'Ma.', 'Di.', 'Wo.', 'Do.', 'Vr.', 'Sa.'],
'months' => ['Januarie', 'Februarie', 'Maart', 'April', 'Mei', 'Junie', 'Julie', 'Augustus', 'September', 'Oktober', 'November', 'Desember'],
'months_short' => ['Jan.', 'Feb.', 'Mrt.', 'Apr.', 'Mei', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Okt.', 'Nov.', 'Des.'],
'first_day_of_week' => 1,
'formats' => [
'LT' => 'HH:mm',
'LTS' => 'HH:mm:ss',
'L' => 'YYYY-MM-DD',
'LL' => 'DD MMM YYYY',
'LLL' => 'DD MMMM YYYY HH:mm',
'LLLL' => 'dddd, DD MMMM YYYY HH:mm',
],
]);

View File

@ -0,0 +1,12 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return require __DIR__.'/af.php';

View File

@ -0,0 +1,28 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array_replace_recursive(require __DIR__.'/en.php', [
'meridiem' => ['a.g', 'a.k'],
'weekdays' => ['tsuʔntsɨ', 'tsuʔukpà', 'tsuʔughɔe', 'tsuʔutɔ̀mlò', 'tsuʔumè', 'tsuʔughɨ̂m', 'tsuʔndzɨkɔʔɔ'],
'weekdays_short' => ['nts', 'kpa', 'ghɔ', 'tɔm', 'ume', 'ghɨ', 'dzk'],
'weekdays_min' => ['nts', 'kpa', 'ghɔ', 'tɔm', 'ume', 'ghɨ', 'dzk'],
'months' => ['ndzɔ̀ŋɔ̀nùm', 'ndzɔ̀ŋɔ̀kƗ̀zùʔ', 'ndzɔ̀ŋɔ̀tƗ̀dʉ̀ghà', 'ndzɔ̀ŋɔ̀tǎafʉ̄ghā', 'ndzɔ̀ŋèsèe', 'ndzɔ̀ŋɔ̀nzùghò', 'ndzɔ̀ŋɔ̀dùmlo', 'ndzɔ̀ŋɔ̀kwîfɔ̀e', 'ndzɔ̀ŋɔ̀tƗ̀fʉ̀ghàdzughù', 'ndzɔ̀ŋɔ̀ghǔuwelɔ̀m', 'ndzɔ̀ŋɔ̀chwaʔàkaa wo', 'ndzɔ̀ŋèfwòo'],
'months_short' => ['nùm', 'kɨz', 'tɨd', 'taa', 'see', 'nzu', 'dum', 'fɔe', 'dzu', 'lɔm', 'kaa', 'fwo'],
'first_day_of_week' => 1,
'formats' => [
'LT' => 'HH:mm',
'LTS' => 'HH:mm:ss',
'L' => 'D/M/YYYY',
'LL' => 'D MMM, YYYY',
'LLL' => 'D MMMM YYYY HH:mm',
'LLLL' => 'dddd D MMMM YYYY HH:mm',
],
]);

View File

@ -0,0 +1,15 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Unknown default region, use the first alphabetically.
*/
return require __DIR__.'/agr_PE.php';

View File

@ -0,0 +1,44 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - somosazucar.org libc-alpha@sourceware.org
*/
return array_replace_recursive(require __DIR__.'/en.php', [
'formats' => [
'L' => 'DD/MM/YY',
],
'months' => ['Petsatin', 'Kupitin', 'Uyaitin', 'Tayutin', 'Kegketin', 'Tegmatin', 'Kuntutin', 'Yagkujutin', 'Daiktatin', 'Ipamtatin', 'Shinutin', 'Sakamtin'],
'months_short' => ['Pet', 'Kup', 'Uya', 'Tay', 'Keg', 'Teg', 'Kun', 'Yag', 'Dait', 'Ipam', 'Shin', 'Sak'],
'weekdays' => ['Tuntuamtin', 'Achutin', 'Kugkuktin', 'Saketin', 'Shimpitin', 'Imaptin', 'Bataetin'],
'weekdays_short' => ['Tun', 'Ach', 'Kug', 'Sak', 'Shim', 'Im', 'Bat'],
'weekdays_min' => ['Tun', 'Ach', 'Kug', 'Sak', 'Shim', 'Im', 'Bat'],
'first_day_of_week' => 0,
'day_of_first_week_of_year' => 7,
'meridiem' => ['VM', 'NM'],
'year' => ':count yaya', // less reliable
'y' => ':count yaya', // less reliable
'a_year' => ':count yaya', // less reliable
'month' => ':count nantu', // less reliable
'm' => ':count nantu', // less reliable
'a_month' => ':count nantu', // less reliable
'day' => ':count nayaim', // less reliable
'd' => ':count nayaim', // less reliable
'a_day' => ':count nayaim', // less reliable
'hour' => ':count kuwiš', // less reliable
'h' => ':count kuwiš', // less reliable
'a_hour' => ':count kuwiš', // less reliable
]);

View File

@ -0,0 +1,15 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Unknown default region, use the first alphabetically.
*/
return require __DIR__.'/ak_GH.php';

View File

@ -0,0 +1,40 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - Sugar Labs // OLPC sugarlabs.org libc-alpha@sourceware.org
*/
return array_replace_recursive(require __DIR__.'/en.php', [
'formats' => [
'L' => 'YYYY/MM/DD',
],
'months' => ['Sanda-Ɔpɛpɔn', 'Kwakwar-Ɔgyefuo', 'Ebɔw-Ɔbenem', 'Ebɔbira-Oforisuo', 'Esusow Aketseaba-Kɔtɔnimba', 'Obirade-Ayɛwohomumu', 'Ayɛwoho-Kitawonsa', 'Difuu-Ɔsandaa', 'Fankwa-Ɛbɔ', 'Ɔbɛsɛ-Ahinime', 'Ɔberɛfɛw-Obubuo', 'Mumu-Ɔpɛnimba'],
'months_short' => ['S-Ɔ', 'K-Ɔ', 'E-Ɔ', 'E-O', 'E-K', 'O-A', 'A-K', 'D-Ɔ', 'F-Ɛ', 'Ɔ-A', 'Ɔ-O', 'M-Ɔ'],
'weekdays' => ['Kwesida', 'Dwowda', 'Benada', 'Wukuda', 'Yawda', 'Fida', 'Memeneda'],
'weekdays_short' => ['Kwe', 'Dwo', 'Ben', 'Wuk', 'Yaw', 'Fia', 'Mem'],
'weekdays_min' => ['Kwe', 'Dwo', 'Ben', 'Wuk', 'Yaw', 'Fia', 'Mem'],
'first_day_of_week' => 1,
'day_of_first_week_of_year' => 1,
'meridiem' => ['AN', 'EW'],
'year' => ':count afe',
'y' => ':count afe',
'a_year' => ':count afe',
'month' => ':count bosume',
'm' => ':count bosume',
'a_month' => ':count bosume',
'day' => ':count ɛda',
'd' => ':count ɛda',
'a_day' => ':count ɛda',
]);

View File

@ -0,0 +1,15 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Unknown default region, use the first alphabetically.
*/
return require __DIR__.'/am_ET.php';

View File

@ -0,0 +1,58 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - Ge'ez Frontier Foundation locales@geez.org
*/
return array_replace_recursive(require __DIR__.'/en.php', [
'formats' => [
'L' => 'DD/MM/YYYY',
],
'months' => ['ጃንዩወሪ', 'ፌብሩወሪ', 'ማርች', 'ኤፕሪል', 'ሜይ', 'ጁን', 'ጁላይ', 'ኦገስት', 'ሴፕቴምበር', 'ኦክቶበር', 'ኖቬምበር', 'ዲሴምበር'],
'months_short' => ['ጃንዩ', 'ፌብሩ', 'ማርች', 'ኤፕረ', 'ሜይ ', 'ጁን ', 'ጁላይ', 'ኦገስ', 'ሴፕቴ', 'ኦክተ', 'ኖቬም', 'ዲሴም'],
'weekdays' => ['እሑድ', 'ሰኞ', 'ማክሰኞ', 'ረቡዕ', 'ሐሙስ', 'ዓርብ', 'ቅዳሜ'],
'weekdays_short' => ['እሑድ', 'ሰኞ ', 'ማክሰ', 'ረቡዕ', 'ሐሙስ', 'ዓርብ', 'ቅዳሜ'],
'weekdays_min' => ['እሑድ', 'ሰኞ ', 'ማክሰ', 'ረቡዕ', 'ሐሙስ', 'ዓርብ', 'ቅዳሜ'],
'day_of_first_week_of_year' => 1,
'meridiem' => ['ጡዋት', 'ከሰዓት'],
'year' => ':count አመት',
'y' => ':count አመት',
'a_year' => ':count አመት',
'month' => ':count ወር',
'm' => ':count ወር',
'a_month' => ':count ወር',
'week' => ':count ሳምንት',
'w' => ':count ሳምንት',
'a_week' => ':count ሳምንት',
'day' => ':count ቀን',
'd' => ':count ቀን',
'a_day' => ':count ቀን',
'hour' => ':count ሰዓት',
'h' => ':count ሰዓት',
'a_hour' => ':count ሰዓት',
'minute' => ':count ደቂቃ',
'min' => ':count ደቂቃ',
'a_minute' => ':count ደቂቃ',
'second' => ':count ሴኮንድ',
's' => ':count ሴኮንድ',
'a_second' => ':count ሴኮንድ',
'ago' => 'ከ:time በፊት',
'from_now' => 'በ:time ውስጥ',
]);

View File

@ -0,0 +1,15 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Unknown default region, use the first alphabetically.
*/
return require __DIR__.'/an_ES.php';

View File

@ -0,0 +1,55 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - Softaragones Jordi Mallach Pérez, Juan Pablo Martínez bug-glibc-locales@gnu.org, softaragones@softaragones.org
*/
return array_replace_recursive(require __DIR__.'/en.php', [
'formats' => [
'L' => 'DD/MM/YYYY',
],
'months' => ['chinero', 'febrero', 'marzo', 'abril', 'mayo', 'chunyo', 'chuliol', 'agosto', 'setiembre', 'octubre', 'noviembre', 'aviento'],
'months_short' => ['chi', 'feb', 'mar', 'abr', 'may', 'chn', 'chl', 'ago', 'set', 'oct', 'nov', 'avi'],
'weekdays' => ['domingo', 'luns', 'martes', 'mierques', 'chueves', 'viernes', 'sabado'],
'weekdays_short' => ['dom', 'lun', 'mar', 'mie', 'chu', 'vie', 'sab'],
'weekdays_min' => ['dom', 'lun', 'mar', 'mie', 'chu', 'vie', 'sab'],
'first_day_of_week' => 1,
'day_of_first_week_of_year' => 4,
'year' => ':count año',
'y' => ':count año',
'a_year' => ':count año',
'month' => ':count mes',
'm' => ':count mes',
'a_month' => ':count mes',
'week' => ':count semana',
'w' => ':count semana',
'a_week' => ':count semana',
'day' => ':count día',
'd' => ':count día',
'a_day' => ':count día',
'hour' => ':count reloch', // less reliable
'h' => ':count reloch', // less reliable
'a_hour' => ':count reloch', // less reliable
'minute' => ':count minuto',
'min' => ':count minuto',
'a_minute' => ':count minuto',
'second' => ':count segundo',
's' => ':count segundo',
'a_second' => ':count segundo',
]);

View File

@ -0,0 +1,15 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Unknown default region, use the first alphabetically.
*/
return require __DIR__.'/anp_IN.php';

View File

@ -0,0 +1,27 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - bhashaghar@googlegroups.com
*/
return array_replace_recursive(require __DIR__.'/en.php', [
'formats' => [
'L' => 'D/M/YY',
],
'months' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितंबर', 'अक्टूबर', 'नवंबर', 'दिसंबर"'],
'months_short' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितंबर', 'अक्टूबर', 'नवंबर', 'दिसंबर'],
'weekdays' => ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'बृहस्पतिवार', 'शुक्रवार', 'शनिवार'],
'weekdays_short' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पति', 'शुक्र', 'शनि'],
'weekdays_min' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पति', 'शुक्र', 'शनि'],
'day_of_first_week_of_year' => 1,
'meridiem' => ['पूर्वाह्न', 'अपराह्न'],
]);

View File

@ -0,0 +1,93 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - Atef Ben Ali (atefBB)
* - Ibrahim AshShohail
* - MLTDev
* - Mohamed Sabil (mohamedsabil83)
* - Yazan Alnugnugh (yazan-alnugnugh)
*/
$months = [
'يناير',
'فبراير',
'مارس',
'أبريل',
'مايو',
'يونيو',
'يوليو',
'أغسطس',
'سبتمبر',
'أكتوبر',
'نوفمبر',
'ديسمبر',
];
return [
'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']),
'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']),
'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']),
'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']),
'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']),
'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']),
'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']),
'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']),
'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']),
'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']),
'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']),
'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']),
'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']),
'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']),
'ago' => 'منذ :time',
'from_now' => ':time من الآن',
'after' => 'بعد :time',
'before' => 'قبل :time',
'diff_now' => 'الآن',
'diff_today' => 'اليوم',
'diff_today_regexp' => 'اليوم(?:\\s+عند)?(?:\\s+الساعة)?',
'diff_yesterday' => 'أمس',
'diff_yesterday_regexp' => 'أمس(?:\\s+عند)?(?:\\s+الساعة)?',
'diff_tomorrow' => 'غداً',
'diff_tomorrow_regexp' => 'غدًا(?:\\s+عند)?(?:\\s+الساعة)?',
'diff_before_yesterday' => 'قبل الأمس',
'diff_after_tomorrow' => 'بعد غد',
'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']),
'period_interval' => 'كل :interval',
'period_start_date' => 'من :date',
'period_end_date' => 'إلى :date',
'months' => $months,
'months_short' => $months,
'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'],
'weekdays_min' => ['ح', 'اث', 'ثل', 'أر', 'خم', 'ج', 'س'],
'list' => ['، ', ' و '],
'first_day_of_week' => 6,
'day_of_first_week_of_year' => 1,
'formats' => [
'LT' => 'HH:mm',
'LTS' => 'HH:mm:ss',
'L' => 'D/M/YYYY',
'LL' => 'D MMMM YYYY',
'LLL' => 'D MMMM YYYY HH:mm',
'LLLL' => 'dddd D MMMM YYYY HH:mm',
],
'calendar' => [
'sameDay' => '[اليوم عند الساعة] LT',
'nextDay' => '[غدًا عند الساعة] LT',
'nextWeek' => 'dddd [عند الساعة] LT',
'lastDay' => '[أمس عند الساعة] LT',
'lastWeek' => 'dddd [عند الساعة] LT',
'sameElse' => 'L',
],
'meridiem' => ['ص', 'م'],
'weekend' => [5, 6],
];

View File

@ -0,0 +1,29 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
* - Abdullah-Alhariri
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
'formats' => [
'L' => 'DD MMM, YYYY',
],
'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'],
'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'],
'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت '],
'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'first_day_of_week' => 6,
'day_of_first_week_of_year' => 1,
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
]);

View File

@ -0,0 +1,29 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
* - Abdullah-Alhariri
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
'formats' => [
'L' => 'DD MMM, YYYY',
],
'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'],
'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'],
'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'first_day_of_week' => 6,
'day_of_first_week_of_year' => 1,
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
]);

View File

@ -0,0 +1,13 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
]);

View File

@ -0,0 +1,92 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Authors:
* - Josh Soref
* - Noureddine LOUAHEDJ
* - JD Isaacks
* - Atef Ben Ali (atefBB)
* - Mohamed Sabil (mohamedsabil83)
*/
$months = [
'جانفي',
'فيفري',
'مارس',
'أفريل',
'ماي',
'جوان',
'جويلية',
'أوت',
'سبتمبر',
'أكتوبر',
'نوفمبر',
'ديسمبر',
];
return [
'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']),
'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']),
'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']),
'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']),
'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']),
'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']),
'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']),
'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']),
'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']),
'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']),
'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']),
'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']),
'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']),
'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']),
'ago' => 'منذ :time',
'from_now' => 'في :time',
'after' => 'بعد :time',
'before' => 'قبل :time',
'diff_now' => 'الآن',
'diff_today' => 'اليوم',
'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?',
'diff_yesterday' => 'أمس',
'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?',
'diff_tomorrow' => 'غداً',
'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?',
'diff_before_yesterday' => 'قبل الأمس',
'diff_after_tomorrow' => 'بعد غد',
'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']),
'period_interval' => 'كل :interval',
'period_start_date' => 'من :date',
'period_end_date' => 'إلى :date',
'months' => $months,
'months_short' => $months,
'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'],
'weekdays_min' => ['أح', 'إث', 'ثلا', 'أر', 'خم', 'جم', 'سب'],
'list' => ['، ', ' و '],
'first_day_of_week' => 0,
'day_of_first_week_of_year' => 4,
'formats' => [
'LT' => 'HH:mm',
'LTS' => 'HH:mm:ss',
'L' => 'DD/MM/YYYY',
'LL' => 'D MMMM YYYY',
'LLL' => 'D MMMM YYYY HH:mm',
'LLLL' => 'dddd D MMMM YYYY HH:mm',
],
'calendar' => [
'sameDay' => '[اليوم على الساعة] LT',
'nextDay' => '[غدا على الساعة] LT',
'nextWeek' => 'dddd [على الساعة] LT',
'lastDay' => '[أمس على الساعة] LT',
'lastWeek' => 'dddd [على الساعة] LT',
'sameElse' => 'L',
],
'meridiem' => ['ص', 'م'],
];

View File

@ -0,0 +1,29 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
* - Abdullah-Alhariri
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
'formats' => [
'L' => 'DD MMM, YYYY',
],
'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'],
'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'],
'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'first_day_of_week' => 6,
'day_of_first_week_of_year' => 1,
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
]);

View File

@ -0,0 +1,13 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
]);

View File

@ -0,0 +1,13 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
]);

View File

@ -0,0 +1,13 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
]);

View File

@ -0,0 +1,26 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
'formats' => [
'L' => 'D/M/YY',
],
'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'],
'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'],
'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'day_of_first_week_of_year' => 1,
]);

View File

@ -0,0 +1,29 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
* - Abdullah-Alhariri
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
'formats' => [
'L' => 'DD MMM, YYYY',
],
'months' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
'months_short' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'first_day_of_week' => 6,
'day_of_first_week_of_year' => 1,
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
]);

View File

@ -0,0 +1,29 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
* - Abdullah-Alhariri
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
'formats' => [
'L' => 'DD MMM, YYYY',
],
'months' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
'months_short' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'first_day_of_week' => 6,
'day_of_first_week_of_year' => 1,
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
]);

View File

@ -0,0 +1,13 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
]);

View File

@ -0,0 +1,95 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Authors:
* - Josh Soref
* - Nusret Parlak
* - JD Isaacks
* - Atef Ben Ali (atefBB)
* - Mohamed Sabil (mohamedsabil83)
* - Abdullah-Alhariri
*/
$months = [
'يناير',
'فبراير',
'مارس',
'أبريل',
'ماي',
'يونيو',
'يوليوز',
'غشت',
'شتنبر',
'أكتوبر',
'نونبر',
'دجنبر',
];
return [
'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']),
'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']),
'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']),
'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']),
'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']),
'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']),
'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']),
'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']),
'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']),
'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']),
'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']),
'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']),
'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']),
'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']),
'ago' => 'منذ :time',
'from_now' => 'في :time',
'after' => 'بعد :time',
'before' => 'قبل :time',
'diff_now' => 'الآن',
'diff_today' => 'اليوم',
'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?',
'diff_yesterday' => 'أمس',
'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?',
'diff_tomorrow' => 'غداً',
'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?',
'diff_before_yesterday' => 'قبل الأمس',
'diff_after_tomorrow' => 'بعد غد',
'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']),
'period_interval' => 'كل :interval',
'period_start_date' => 'من :date',
'period_end_date' => 'إلى :date',
'months' => $months,
'months_short' => $months,
'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'],
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'list' => ['، ', ' و '],
'first_day_of_week' => 0,
'day_of_first_week_of_year' => 1,
'formats' => [
'LT' => 'HH:mm',
'LTS' => 'HH:mm:ss',
'L' => 'DD/MM/YYYY',
'LL' => 'D MMMM YYYY',
'LLL' => 'D MMMM YYYY HH:mm',
'LLLL' => 'dddd D MMMM YYYY HH:mm',
],
'calendar' => [
'sameDay' => '[اليوم على الساعة] LT',
'nextDay' => '[غدا على الساعة] LT',
'nextWeek' => 'dddd [على الساعة] LT',
'lastDay' => '[أمس على الساعة] LT',
'lastWeek' => 'dddd [على الساعة] LT',
'sameElse' => 'L',
],
'meridiem' => ['ص', 'م'],
'weekend' => [5, 6],
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
];

View File

@ -0,0 +1,29 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
* - Abdullah-Alhariri
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
'formats' => [
'L' => 'DD MMM, YYYY',
],
'months' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
'months_short' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'first_day_of_week' => 1,
'day_of_first_week_of_year' => 1,
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
]);

View File

@ -0,0 +1,92 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - Atef Ben Ali (atefBB)
* - Ibrahim AshShohail
* - MLTDev
*/
$months = [
'يناير',
'فبراير',
'مارس',
'أبريل',
'مايو',
'يونيو',
'يوليو',
'أغسطس',
'سبتمبر',
'أكتوبر',
'نوفمبر',
'ديسمبر',
];
return [
'year' => implode('|', [':count سنة', 'سنة', 'سنتين', ':count سنوات', ':count سنة']),
'a_year' => implode('|', [':count سنة', 'سنة', 'سنتين', ':count سنوات', ':count سنة']),
'month' => implode('|', [':count شهر', 'شهر', 'شهرين', ':count أشهر', ':count شهر']),
'a_month' => implode('|', [':count شهر', 'شهر', 'شهرين', ':count أشهر', ':count شهر']),
'week' => implode('|', [':count أسبوع', 'أسبوع', 'أسبوعين', ':count أسابيع', ':count أسبوع']),
'a_week' => implode('|', [':count أسبوع', 'أسبوع', 'أسبوعين', ':count أسابيع', ':count أسبوع']),
'day' => implode('|', [':count يوم', 'يوم', 'يومين', ':count أيام', ':count يوم']),
'a_day' => implode('|', [':count يوم', 'يوم', 'يومين', ':count أيام', ':count يوم']),
'hour' => implode('|', [':count ساعة', 'ساعة', 'ساعتين', ':count ساعات', ':count ساعة']),
'a_hour' => implode('|', [':count ساعة', 'ساعة', 'ساعتين', ':count ساعات', ':count ساعة']),
'minute' => implode('|', [':count دقيقة', 'دقيقة', 'دقيقتين', ':count دقائق', ':count دقيقة']),
'a_minute' => implode('|', [':count دقيقة', 'دقيقة', 'دقيقتين', ':count دقائق', ':count دقيقة']),
'second' => implode('|', [':count ثانية', 'ثانية', 'ثانيتين', ':count ثواني', ':count ثانية']),
'a_second' => implode('|', [':count ثانية', 'ثانية', 'ثانيتين', ':count ثواني', ':count ثانية']),
'ago' => 'منذ :time',
'from_now' => ':time من الآن',
'after' => 'بعد :time',
'before' => 'قبل :time',
'diff_now' => 'الآن',
'diff_today' => 'اليوم',
'diff_today_regexp' => 'اليوم(?:\\s+عند)?(?:\\s+الساعة)?',
'diff_yesterday' => 'أمس',
'diff_yesterday_regexp' => 'أمس(?:\\s+عند)?(?:\\s+الساعة)?',
'diff_tomorrow' => 'غداً',
'diff_tomorrow_regexp' => 'غدًا(?:\\s+عند)?(?:\\s+الساعة)?',
'diff_before_yesterday' => 'قبل الأمس',
'diff_after_tomorrow' => 'بعد غد',
'period_recurrences' => implode('|', ['مرة', 'مرة', ':count مرتين', ':count مرات', ':count مرة']),
'period_interval' => 'كل :interval',
'period_start_date' => 'من :date',
'period_end_date' => 'إلى :date',
'months' => $months,
'months_short' => $months,
'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'],
'weekdays_min' => ['ح', 'اث', 'ثل', 'أر', 'خم', 'ج', 'س'],
'list' => ['، ', ' و '],
'first_day_of_week' => 6,
'day_of_first_week_of_year' => 1,
'formats' => [
'LT' => 'HH:mm',
'LTS' => 'HH:mm:ss',
'L' => 'D/M/YYYY',
'LL' => 'D MMMM YYYY',
'LLL' => 'D MMMM YYYY HH:mm',
'LLLL' => 'dddd D MMMM YYYY HH:mm',
],
'calendar' => [
'sameDay' => '[اليوم عند الساعة] LT',
'nextDay' => '[غدًا عند الساعة] LT',
'nextWeek' => 'dddd [عند الساعة] LT',
'lastDay' => '[أمس عند الساعة] LT',
'lastWeek' => 'dddd [عند الساعة] LT',
'sameElse' => 'L',
],
'meridiem' => ['ص', 'م'],
'weekend' => [5, 6],
];

View File

@ -0,0 +1,92 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Authors:
* - Josh Soref
* - JD Isaacks
* - Atef Ben Ali (atefBB)
* - Mohamed Sabil (mohamedsabil83)
*/
$months = [
'يناير',
'فبراير',
'مارس',
'أبريل',
'ماي',
'يونيو',
'يوليوز',
'غشت',
'شتنبر',
'أكتوبر',
'نونبر',
'دجنبر',
];
return [
'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']),
'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']),
'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']),
'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']),
'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']),
'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']),
'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']),
'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']),
'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']),
'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']),
'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']),
'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']),
'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']),
'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']),
'ago' => 'منذ :time',
'from_now' => 'في :time',
'after' => 'بعد :time',
'before' => 'قبل :time',
'diff_now' => 'الآن',
'diff_today' => 'اليوم',
'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?',
'diff_yesterday' => 'أمس',
'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?',
'diff_tomorrow' => 'غداً',
'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?',
'diff_before_yesterday' => 'قبل الأمس',
'diff_after_tomorrow' => 'بعد غد',
'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']),
'period_interval' => 'كل :interval',
'period_start_date' => 'من :date',
'period_end_date' => 'إلى :date',
'months' => $months,
'months_short' => $months,
'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'],
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'list' => ['، ', ' و '],
'first_day_of_week' => 6,
'day_of_first_week_of_year' => 1,
'formats' => [
'LT' => 'HH:mm',
'LTS' => 'HH:mm:ss',
'L' => 'DD/MM/YYYY',
'LL' => 'D MMMM YYYY',
'LLL' => 'D MMMM YYYY HH:mm',
'LLLL' => 'dddd D MMMM YYYY HH:mm',
],
'calendar' => [
'sameDay' => '[اليوم على الساعة] LT',
'nextDay' => '[غدا على الساعة] LT',
'nextWeek' => 'dddd [على الساعة] LT',
'lastDay' => '[أمس على الساعة] LT',
'lastWeek' => 'dddd [على الساعة] LT',
'sameElse' => 'L',
],
'meridiem' => ['ص', 'م'],
'weekend' => [5, 6],
];

View File

@ -0,0 +1,13 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
]);

View File

@ -0,0 +1,29 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
* - Abdullah-Alhariri
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
'formats' => [
'L' => 'DD MMM, YYYY',
],
'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'],
'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'],
'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'first_day_of_week' => 6,
'day_of_first_week_of_year' => 1,
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
]);

View File

@ -0,0 +1,18 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - Abdullah-Alhariri
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
]);

View File

@ -0,0 +1,29 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
* - Abdullah-Alhariri
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
'formats' => [
'L' => 'DD MMM, YYYY',
],
'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'],
'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'],
'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'first_day_of_week' => 6,
'day_of_first_week_of_year' => 1,
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
]);

View File

@ -0,0 +1,94 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Authors:
* - Josh Soref
* - JD Isaacks
* - Atef Ben Ali (atefBB)
* - Mohamed Sabil (mohamedsabil83)
* - Abdullah-Alhariri
*/
$months = [
'يناير',
'فبراير',
'مارس',
'أبريل',
'مايو',
'يونيو',
'يوليو',
'أغسطس',
'سبتمبر',
'أكتوبر',
'نوفمبر',
'ديسمبر',
];
return [
'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']),
'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']),
'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']),
'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']),
'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']),
'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']),
'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']),
'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']),
'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']),
'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']),
'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']),
'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']),
'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']),
'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']),
'ago' => 'منذ :time',
'from_now' => 'في :time',
'after' => 'بعد :time',
'before' => 'قبل :time',
'diff_now' => 'الآن',
'diff_today' => 'اليوم',
'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?',
'diff_yesterday' => 'أمس',
'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?',
'diff_tomorrow' => 'غداً',
'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?',
'diff_before_yesterday' => 'قبل الأمس',
'diff_after_tomorrow' => 'بعد غد',
'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']),
'period_interval' => 'كل :interval',
'period_start_date' => 'من :date',
'period_end_date' => 'إلى :date',
'months' => $months,
'months_short' => $months,
'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'],
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'list' => ['، ', ' و '],
'first_day_of_week' => 6,
'day_of_first_week_of_year' => 1,
'formats' => [
'LT' => 'HH:mm',
'LTS' => 'HH:mm:ss',
'L' => 'DD/MM/YYYY',
'LL' => 'D MMMM YYYY',
'LLL' => 'D MMMM YYYY HH:mm',
'LLLL' => 'dddd D MMMM YYYY HH:mm',
],
'calendar' => [
'sameDay' => '[اليوم على الساعة] LT',
'nextDay' => '[غدا على الساعة] LT',
'nextWeek' => 'dddd [على الساعة] LT',
'lastDay' => '[أمس على الساعة] LT',
'lastWeek' => 'dddd [على الساعة] LT',
'sameElse' => 'L',
],
'meridiem' => ['ص', 'م'],
'weekend' => [5, 6],
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
];

View File

@ -0,0 +1,29 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/*
* Authors:
* - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org
* - Abdullah-Alhariri
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
'formats' => [
'L' => 'DD MMM, YYYY',
],
'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'],
'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'],
'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
'first_day_of_week' => 6,
'day_of_first_week_of_year' => 1,
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
]);

View File

@ -0,0 +1,13 @@
<?php
/**
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return array_replace_recursive(require __DIR__.'/ar.php', [
]);

Some files were not shown because too many files have changed in this diff Show More