validation-bugsnag-email
This commit is contained in:
1
vendor/nesbot/carbon/composer.json
vendored
1
vendor/nesbot/carbon/composer.json
vendored
@@ -105,6 +105,7 @@
|
||||
"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": [
|
||||
|
||||
@@ -298,7 +298,12 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
*/
|
||||
public static function getCascadeFactors()
|
||||
{
|
||||
return static::$cascadeFactors ?: [
|
||||
return static::$cascadeFactors ?: static::getDefaultCascadeFactors();
|
||||
}
|
||||
|
||||
protected static function getDefaultCascadeFactors(): array
|
||||
{
|
||||
return [
|
||||
'milliseconds' => [Carbon::MICROSECONDS_PER_MILLISECOND, 'microseconds'],
|
||||
'seconds' => [Carbon::MILLISECONDS_PER_SECOND, 'milliseconds'],
|
||||
'minutes' => [Carbon::SECONDS_PER_MINUTE, 'seconds'],
|
||||
@@ -1883,7 +1888,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
/**
|
||||
* Invert the interval.
|
||||
*
|
||||
* @param bool|int $inverted if a parameter is passed, the passed value casted as 1 or 0 is used
|
||||
* @param bool|int $inverted if a parameter is passed, the passed value cast as 1 or 0 is used
|
||||
* as the new value of the ->invert property.
|
||||
*
|
||||
* @return $this
|
||||
@@ -2720,6 +2725,15 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
*/
|
||||
public function roundUnit($unit, $precision = 1, $function = 'round')
|
||||
{
|
||||
if (static::getCascadeFactors() !== static::getDefaultCascadeFactors()) {
|
||||
$value = $function($this->total($unit) / $precision) * $precision;
|
||||
$inverted = $value < 0;
|
||||
|
||||
return $this->copyProperties(self::fromString(
|
||||
number_format(abs($value), 12, '.', '').' '.$unit
|
||||
)->invert($inverted)->cascade());
|
||||
}
|
||||
|
||||
$base = CarbonImmutable::parse('2000-01-01 00:00:00', 'UTC')
|
||||
->roundUnit($unit, $precision, $function);
|
||||
$next = $base->add($this);
|
||||
|
||||
226
vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php
vendored
226
vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php
vendored
@@ -255,6 +255,13 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
*/
|
||||
protected $dateInterval;
|
||||
|
||||
/**
|
||||
* True once __construct is finished.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $constructed = false;
|
||||
|
||||
/**
|
||||
* Whether current date interval was set by default.
|
||||
*
|
||||
@@ -695,6 +702,8 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
if ($this->options === null) {
|
||||
$this->setOptions(0);
|
||||
}
|
||||
|
||||
$this->constructed = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -707,6 +716,17 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
return clone $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the getter for a property allowing both `DatePeriod` snakeCase and camelCase names.
|
||||
*
|
||||
@@ -798,7 +818,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
*
|
||||
* @param string $dateClass
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function setDateClass(string $dateClass)
|
||||
{
|
||||
@@ -806,15 +826,16 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
throw new NotACarbonClassException($dateClass);
|
||||
}
|
||||
|
||||
$this->dateClass = $dateClass;
|
||||
$self = $this->copyIfImmutable();
|
||||
$self->dateClass = $dateClass;
|
||||
|
||||
if (is_a($dateClass, Carbon::class, true)) {
|
||||
$this->toggleOptions(static::IMMUTABLE, false);
|
||||
$self->options = $self->options & ~static::IMMUTABLE;
|
||||
} elseif (is_a($dateClass, CarbonImmutable::class, true)) {
|
||||
$this->toggleOptions(static::IMMUTABLE, true);
|
||||
$self->options = $self->options | static::IMMUTABLE;
|
||||
}
|
||||
|
||||
return $this;
|
||||
return $self;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -834,7 +855,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
*
|
||||
* @throws InvalidIntervalException
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function setDateInterval($interval)
|
||||
{
|
||||
@@ -846,25 +867,24 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
throw new InvalidIntervalException('Empty interval is not accepted.');
|
||||
}
|
||||
|
||||
$this->dateInterval = $interval;
|
||||
$self = $this->copyIfImmutable();
|
||||
$self->dateInterval = $interval;
|
||||
|
||||
$this->isDefaultInterval = false;
|
||||
$self->isDefaultInterval = false;
|
||||
|
||||
$this->handleChangedParameters();
|
||||
$self->handleChangedParameters();
|
||||
|
||||
return $this;
|
||||
return $self;
|
||||
}
|
||||
|
||||
/**
|
||||
* Invert the period date interval.
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function invertDateInterval()
|
||||
{
|
||||
$interval = $this->dateInterval->invert();
|
||||
|
||||
return $this->setDateInterval($interval);
|
||||
return $this->setDateInterval($this->dateInterval->invert());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -873,14 +893,11 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
* @param DateTime|DateTimeInterface|string $start
|
||||
* @param DateTime|DateTimeInterface|string|null $end
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function setDates($start, $end)
|
||||
{
|
||||
$this->setStartDate($start);
|
||||
$this->setEndDate($end);
|
||||
|
||||
return $this;
|
||||
return $this->setStartDate($start)->setEndDate($end);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -890,7 +907,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function setOptions($options)
|
||||
{
|
||||
@@ -898,11 +915,12 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
throw new InvalidPeriodParameterException('Invalid options.');
|
||||
}
|
||||
|
||||
$this->options = $options ?: 0;
|
||||
$self = $this->copyIfImmutable();
|
||||
$self->options = $options ?: 0;
|
||||
|
||||
$this->handleChangedParameters();
|
||||
$self->handleChangedParameters();
|
||||
|
||||
return $this;
|
||||
return $self;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -923,7 +941,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function toggleOptions($options, $state = null)
|
||||
{
|
||||
@@ -943,7 +961,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
*
|
||||
* @param bool $state
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function excludeStartDate($state = true)
|
||||
{
|
||||
@@ -955,7 +973,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
*
|
||||
* @param bool $state
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function excludeEndDate($state = true)
|
||||
{
|
||||
@@ -1099,17 +1117,18 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
* @param callable $callback
|
||||
* @param string $name
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function addFilter($callback, $name = null)
|
||||
{
|
||||
$tuple = $this->createFilterTuple(\func_get_args());
|
||||
$self = $this->copyIfImmutable();
|
||||
$tuple = $self->createFilterTuple(\func_get_args());
|
||||
|
||||
$this->filters[] = $tuple;
|
||||
$self->filters[] = $tuple;
|
||||
|
||||
$this->handleChangedParameters();
|
||||
$self->handleChangedParameters();
|
||||
|
||||
return $this;
|
||||
return $self;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1120,17 +1139,18 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
* @param callable $callback
|
||||
* @param string $name
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function prependFilter($callback, $name = null)
|
||||
{
|
||||
$tuple = $this->createFilterTuple(\func_get_args());
|
||||
$self = $this->copyIfImmutable();
|
||||
$tuple = $self->createFilterTuple(\func_get_args());
|
||||
|
||||
array_unshift($this->filters, $tuple);
|
||||
array_unshift($self->filters, $tuple);
|
||||
|
||||
$this->handleChangedParameters();
|
||||
$self->handleChangedParameters();
|
||||
|
||||
return $this;
|
||||
return $self;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1138,24 +1158,25 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
*
|
||||
* @param callable|string $filter
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function removeFilter($filter)
|
||||
{
|
||||
$self = $this->copyIfImmutable();
|
||||
$key = \is_callable($filter) ? 0 : 1;
|
||||
|
||||
$this->filters = array_values(array_filter(
|
||||
$self->filters = array_values(array_filter(
|
||||
$this->filters,
|
||||
function ($tuple) use ($key, $filter) {
|
||||
return $tuple[$key] !== $filter;
|
||||
}
|
||||
));
|
||||
|
||||
$this->updateInternalState();
|
||||
$self->updateInternalState();
|
||||
|
||||
$this->handleChangedParameters();
|
||||
$self->handleChangedParameters();
|
||||
|
||||
return $this;
|
||||
return $self;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1193,39 +1214,41 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
*
|
||||
* @param array $filters
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function setFilters(array $filters)
|
||||
{
|
||||
$this->filters = $filters;
|
||||
$self = $this->copyIfImmutable();
|
||||
$self->filters = $filters;
|
||||
|
||||
$this->updateInternalState();
|
||||
$self->updateInternalState();
|
||||
|
||||
$this->handleChangedParameters();
|
||||
$self->handleChangedParameters();
|
||||
|
||||
return $this;
|
||||
return $self;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset filters stack.
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function resetFilters()
|
||||
{
|
||||
$this->filters = [];
|
||||
$self = $this->copyIfImmutable();
|
||||
$self->filters = [];
|
||||
|
||||
if ($this->endDate !== null) {
|
||||
$this->filters[] = [static::END_DATE_FILTER, null];
|
||||
if ($self->endDate !== null) {
|
||||
$self->filters[] = [static::END_DATE_FILTER, null];
|
||||
}
|
||||
|
||||
if ($this->recurrences !== null) {
|
||||
$this->filters[] = [static::RECURRENCES_FILTER, null];
|
||||
if ($self->recurrences !== null) {
|
||||
$self->filters[] = [static::RECURRENCES_FILTER, null];
|
||||
}
|
||||
|
||||
$this->handleChangedParameters();
|
||||
$self->handleChangedParameters();
|
||||
|
||||
return $this;
|
||||
return $self;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1235,7 +1258,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function setRecurrences($recurrences)
|
||||
{
|
||||
@@ -1247,15 +1270,17 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
return $this->removeFilter(static::RECURRENCES_FILTER);
|
||||
}
|
||||
|
||||
$this->recurrences = $recurrences === INF ? INF : (int) $recurrences;
|
||||
/** @var self $self */
|
||||
$self = $this->copyIfImmutable();
|
||||
$self->recurrences = $recurrences === INF ? INF : (int) $recurrences;
|
||||
|
||||
if (!$this->hasFilter(static::RECURRENCES_FILTER)) {
|
||||
return $this->addFilter(static::RECURRENCES_FILTER);
|
||||
if (!$self->hasFilter(static::RECURRENCES_FILTER)) {
|
||||
return $self->addFilter(static::RECURRENCES_FILTER);
|
||||
}
|
||||
|
||||
$this->handleChangedParameters();
|
||||
$self->handleChangedParameters();
|
||||
|
||||
return $this;
|
||||
return $self;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1266,7 +1291,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
*
|
||||
* @throws InvalidPeriodDateException
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function setStartDate($date, $inclusive = null)
|
||||
{
|
||||
@@ -1274,13 +1299,14 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
throw new InvalidPeriodDateException('Invalid start date.');
|
||||
}
|
||||
|
||||
$this->startDate = $date;
|
||||
$self = $this->copyIfImmutable();
|
||||
$self->startDate = $date;
|
||||
|
||||
if ($inclusive !== null) {
|
||||
$this->toggleOptions(static::EXCLUDE_START_DATE, !$inclusive);
|
||||
$self = $self->toggleOptions(static::EXCLUDE_START_DATE, !$inclusive);
|
||||
}
|
||||
|
||||
return $this;
|
||||
return $self;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1291,7 +1317,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function setEndDate($date, $inclusive = null)
|
||||
{
|
||||
@@ -1303,19 +1329,20 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
return $this->removeFilter(static::END_DATE_FILTER);
|
||||
}
|
||||
|
||||
$this->endDate = $date;
|
||||
$self = $this->copyIfImmutable();
|
||||
$self->endDate = $date;
|
||||
|
||||
if ($inclusive !== null) {
|
||||
$this->toggleOptions(static::EXCLUDE_END_DATE, !$inclusive);
|
||||
$self = $self->toggleOptions(static::EXCLUDE_END_DATE, !$inclusive);
|
||||
}
|
||||
|
||||
if (!$this->hasFilter(static::END_DATE_FILTER)) {
|
||||
return $this->addFilter(static::END_DATE_FILTER);
|
||||
if (!$self->hasFilter(static::END_DATE_FILTER)) {
|
||||
return $self->addFilter(static::END_DATE_FILTER);
|
||||
}
|
||||
|
||||
$this->handleChangedParameters();
|
||||
$self->handleChangedParameters();
|
||||
|
||||
return $this;
|
||||
return $self;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1800,18 +1827,19 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
*/
|
||||
public function setTimezone($timezone)
|
||||
{
|
||||
$this->tzName = $timezone;
|
||||
$this->timezone = $timezone;
|
||||
$self = $this->copyIfImmutable();
|
||||
$self->tzName = $timezone;
|
||||
$self->timezone = $timezone;
|
||||
|
||||
if ($this->startDate) {
|
||||
$this->setStartDate($this->startDate->setTimezone($timezone));
|
||||
if ($self->startDate) {
|
||||
$self = $self->setStartDate($self->startDate->setTimezone($timezone));
|
||||
}
|
||||
|
||||
if ($this->endDate) {
|
||||
$this->setEndDate($this->endDate->setTimezone($timezone));
|
||||
if ($self->endDate) {
|
||||
$self = $self->setEndDate($self->endDate->setTimezone($timezone));
|
||||
}
|
||||
|
||||
return $this;
|
||||
return $self;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1823,18 +1851,19 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
*/
|
||||
public function shiftTimezone($timezone)
|
||||
{
|
||||
$this->tzName = $timezone;
|
||||
$this->timezone = $timezone;
|
||||
$self = $this->copyIfImmutable();
|
||||
$self->tzName = $timezone;
|
||||
$self->timezone = $timezone;
|
||||
|
||||
if ($this->startDate) {
|
||||
$this->setStartDate($this->startDate->shiftTimezone($timezone));
|
||||
if ($self->startDate) {
|
||||
$self = $self->setStartDate($self->startDate->shiftTimezone($timezone));
|
||||
}
|
||||
|
||||
if ($this->endDate) {
|
||||
$this->setEndDate($this->endDate->shiftTimezone($timezone));
|
||||
if ($self->endDate) {
|
||||
$self = $self->setEndDate($self->endDate->shiftTimezone($timezone));
|
||||
}
|
||||
|
||||
return $this;
|
||||
return $self;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2213,19 +2242,18 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
* @param float|int|string|\DateInterval|null $precision
|
||||
* @param string $function
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function roundUnit($unit, $precision = 1, $function = 'round')
|
||||
{
|
||||
$this->setStartDate($this->getStartDate()->roundUnit($unit, $precision, $function));
|
||||
$self = $this->copyIfImmutable();
|
||||
$self = $self->setStartDate($self->getStartDate()->roundUnit($unit, $precision, $function));
|
||||
|
||||
if ($this->endDate) {
|
||||
$this->setEndDate($this->getEndDate()->roundUnit($unit, $precision, $function));
|
||||
if ($self->endDate) {
|
||||
$self = $self->setEndDate($self->getEndDate()->roundUnit($unit, $precision, $function));
|
||||
}
|
||||
|
||||
$this->setDateInterval($this->getDateInterval()->roundUnit($unit, $precision, $function));
|
||||
|
||||
return $this;
|
||||
return $self->setDateInterval($self->getDateInterval()->roundUnit($unit, $precision, $function));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2234,7 +2262,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
* @param string $unit
|
||||
* @param float|int|string|\DateInterval|null $precision
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function floorUnit($unit, $precision = 1)
|
||||
{
|
||||
@@ -2247,7 +2275,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
* @param string $unit
|
||||
* @param float|int|string|\DateInterval|null $precision
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function ceilUnit($unit, $precision = 1)
|
||||
{
|
||||
@@ -2260,7 +2288,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
* @param float|int|string|\DateInterval|null $precision
|
||||
* @param string $function
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function round($precision = null, $function = 'round')
|
||||
{
|
||||
@@ -2275,7 +2303,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
*
|
||||
* @param float|int|string|\DateInterval|null $precision
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function floor($precision = null)
|
||||
{
|
||||
@@ -2287,7 +2315,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
*
|
||||
* @param float|int|string|\DateInterval|null $precision
|
||||
*
|
||||
* @return $this
|
||||
* @return static
|
||||
*/
|
||||
public function ceil($precision = null)
|
||||
{
|
||||
@@ -2476,9 +2504,9 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
protected function handleChangedParameters()
|
||||
{
|
||||
if (($this->getOptions() & static::IMMUTABLE) && $this->dateClass === Carbon::class) {
|
||||
$this->setDateClass(CarbonImmutable::class);
|
||||
$this->dateClass = CarbonImmutable::class;
|
||||
} elseif (!($this->getOptions() & static::IMMUTABLE) && $this->dateClass === CarbonImmutable::class) {
|
||||
$this->setDateClass(Carbon::class);
|
||||
$this->dateClass = Carbon::class;
|
||||
}
|
||||
|
||||
$this->validationResult = null;
|
||||
|
||||
33
vendor/nesbot/carbon/src/Carbon/CarbonPeriodImmutable.php
vendored
Normal file
33
vendor/nesbot/carbon/src/Carbon/CarbonPeriodImmutable.php
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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
|
||||
{
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* 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' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* 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' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* 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' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* 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' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* 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' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
* - JD Isaacks
|
||||
* - Atef Ben Ali (atefBB)
|
||||
* - Mohamed Sabil (mohamedsabil83)
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
$months = [
|
||||
'يناير',
|
||||
@@ -90,4 +91,5 @@ return [
|
||||
],
|
||||
'meridiem' => ['ص', 'م'],
|
||||
'weekend' => [5, 6],
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
];
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* 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' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 1,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* 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' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -9,5 +9,10 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Authors:
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* 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' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* - JD Isaacks
|
||||
* - Atef Ben Ali (atefBB)
|
||||
* - Mohamed Sabil (mohamedsabil83)
|
||||
* - Abdullah-Alhariri
|
||||
*/
|
||||
$months = [
|
||||
'يناير',
|
||||
@@ -89,4 +90,5 @@ return [
|
||||
],
|
||||
'meridiem' => ['ص', 'م'],
|
||||
'weekend' => [5, 6],
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
];
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* 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' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* 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' => [
|
||||
@@ -24,4 +25,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'first_day_of_week' => 6,
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/*
|
||||
* 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' => [
|
||||
@@ -23,4 +24,5 @@ return array_replace_recursive(require __DIR__.'/ar.php', [
|
||||
'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
'day_of_first_week_of_year' => 1,
|
||||
'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'],
|
||||
]);
|
||||
|
||||
@@ -1022,12 +1022,12 @@ trait Comparison
|
||||
return $current->startOfMinute()->eq($other);
|
||||
}
|
||||
|
||||
if (preg_match('/\d(h|am|pm)$/', $tester)) {
|
||||
if (preg_match('/\d(?:h|am|pm)$/', $tester)) {
|
||||
return $current->startOfHour()->eq($other);
|
||||
}
|
||||
|
||||
if (preg_match(
|
||||
'/^(january|february|march|april|may|june|july|august|september|october|november|december)\s+\d+$/i',
|
||||
'/^(?:january|february|march|april|may|june|july|august|september|october|november|december)(?:\s+\d+)?$/i',
|
||||
$tester
|
||||
)) {
|
||||
return $current->startOfMonth()->eq($other->startOfMonth());
|
||||
|
||||
@@ -16,6 +16,7 @@ use Carbon\CarbonImmutable;
|
||||
use Carbon\CarbonInterface;
|
||||
use Carbon\CarbonInterval;
|
||||
use Carbon\CarbonPeriod;
|
||||
use Carbon\CarbonPeriodImmutable;
|
||||
use Carbon\Exceptions\UnitException;
|
||||
use Closure;
|
||||
use DateTime;
|
||||
@@ -605,16 +606,18 @@ trait Converter
|
||||
$interval = CarbonInterval::make("$interval ".static::pluralUnit($unit));
|
||||
}
|
||||
|
||||
$period = (new CarbonPeriod())->setDateClass(static::class)->setStartDate($this);
|
||||
$period = ($this->isMutable() ? new CarbonPeriod() : new CarbonPeriodImmutable())
|
||||
->setDateClass(static::class)
|
||||
->setStartDate($this);
|
||||
|
||||
if ($interval) {
|
||||
$period->setDateInterval($interval);
|
||||
$period = $period->setDateInterval($interval);
|
||||
}
|
||||
|
||||
if (\is_int($end) || (\is_string($end) && ctype_digit($end))) {
|
||||
$period->setRecurrences($end);
|
||||
$period = $period->setRecurrences($end);
|
||||
} elseif ($end) {
|
||||
$period->setEndDate($end);
|
||||
$period = $period->setEndDate($end);
|
||||
}
|
||||
|
||||
return $period;
|
||||
|
||||
@@ -441,7 +441,7 @@ trait Options
|
||||
return $var;
|
||||
});
|
||||
|
||||
foreach (['dumpProperties', 'constructedObjectId'] as $property) {
|
||||
foreach (['dumpProperties', 'constructedObjectId', 'constructed'] as $property) {
|
||||
if (isset($infos[$property])) {
|
||||
unset($infos[$property]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user