<?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.
*/
$processHoursFunction = function (\Carbon\CarbonInterface $date, string $format) {
return $format.'?'.($date->hour === 11 ? '?' : '').'] LT';
};
/*
* Authors:
* - Kunal Marwaha
* - Josh Soref
* - François B
* - Tim Fish
* - Serhan Apayd?n
* - Max Mykhailenko
* - JD Isaacks
* - Max Kovpak
* - AucT
* - Philippe Vaucher
* - Ilya Shaplyko
* - Vadym Ievsieiev
* - Denys Kurets
* - Igor Kasyanchuk
* - Tsutomu Kuroda
* - tjku
* - Max Melentiev
* - Oleh
* - epaminond
* - Juanito Fatas
* - Vitalii Khustochka
* - Akira Matsuda
* - Christopher Dell
* - Enrique Vidal
* - Simone Carletti
* - Aaron Patterson
* - Andriy Tyurnikov
* - Nicolás Hock Isaza
* - Iwakura Taro
* - Andrii Ponomarov
* - alecrabbit
* - vystepanenko
* - AlexWalkerson
* - Andre Havryliuk (Andrend)
*/
return [
'year' => ':count ???|:count ????|:count ?????',
'y' => ':count?',
'a_year' => '{1}???|:count ???|:count ????|:count ?????',
'month' => ':count ??????|:count ??????|:count ???????',
'm' => ':count?',
'a_month' => '{1}??????|:count ??????|:count ??????|:count ???????',
'week' => ':count ???????|:count ?????|:count ??????',
'w' => ':count?',
'a_week' => '{1}???????|:count ???????|:count ?????|:count ??????',
'day' => ':count ????|:count ???|:count ????',
'd' => ':count?',
'a_day' => '{1}????|:count ????|:count ???|:count ????',
'hour' => ':count ??????|:count ??????|:count ?????',
'h' => ':count?',
'a_hour' => '{1}??????|:count ??????|:count ??????|:count ?????',
'minute' => ':count ???????|:count ???????|:count ??????',
'min' => ':count??',
'a_minute' => '{1}???????|:count ???????|:count ???????|:count ??????',
'second' => ':count ???????|:count ???????|:count ??????',
's' => ':count???',
'a_second' => '{1}?????? ??????|:count ???????|:count ???????|:count ??????',
'ago' => ':time ????',
'from_now' => '?? :time',
'after' => ':time ?????',
'before' => ':time ??',
'diff_now' => '?????',
'diff_yesterday' => '?????',
'diff_tomorrow' => '??????',
'diff_before_yesterday' => '?????????',
'diff_after_tomorrow' => '???????????',
'period_recurrences' => '???? ???|:count ????|:count ?????',
'period_interval' => '????? :interval',
'period_start_date' => '? :date',
'period_end_date' => '?? :date',
'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' => function (\Carbon\CarbonInterface $date) use ($processHoursFunction) {
return $processHoursFunction($date, '[???????? ');
},
'nextDay' => function (\Carbon\CarbonInterface $date) use ($processHoursFunction) {
return $processHoursFunction($date, '[?????? ');
},
'nextWeek' => function (\Carbon\CarbonInterface $date) use ($processHoursFunction) {
return $processHoursFunction($date, '[?] dddd [');
},
'lastDay' => function (\Carbon\CarbonInterface $date) use ($processHoursFunction) {
return $processHoursFunction($date, '[????? ');
},
'lastWeek' => function (\Carbon\CarbonInterface $date) use ($processHoursFunction) {
switch ($date->dayOfWeek) {
case 0:
case 3:
case 5:
case 6:
return $processHoursFunction($date, '[???????] dddd [');
default:
return $processHoursFunction($date, '[????????] dddd [');
}
},
'sameElse' => 'L',
],
'ordinal' => function ($number, $period) {
switch ($period) {
case 'M':
case 'd':
case 'DDD':
case 'w':
case 'W':
return $number.'-?';
case 'D':
return $number.'-??';
default:
return $number;
}
},
'meridiem' => function ($hour) {
if ($hour < 4) {
return '????';
}
if ($hour < 12) {
return '?????';
}
if ($hour < 17) {
return '???';
}
return '??????';
},
'months' => ['?????', '??????', '???????', '??????', '??????', '??????', '?????', '??????', '???????', '??????', '?????????', '??????'],
'months_standalone' => ['??????', '?????', '????????', '???????', '???????', '???????', '??????', '???????', '????????', '???????', '????????', '???????'],
'months_short' => ['???', '???', '???', '???', '???', '???', '???', '???', '???', '???', '???', '???'],
'months_regexp' => '/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/',
'weekdays' => function (\Carbon\CarbonInterface $date, $format, $index) {
static $words = [
'nominative' => ['??????', '?????????', '????????', '??????', '??????', '????????', '??????'],
'accusative' => ['??????', '?????????', '????????', '??????', '??????', '????????', '??????'],
'genitive' => ['??????', '?????????', '????????', '??????', '????????', '????????', '??????'],
];
$nounCase = preg_match('/(\[(?|?|?|?)\])\s+dddd/', $format)
? 'accusative'
: (
preg_match('/\[?(?:???????|?????????)?\s*\]\s+dddd/', $format)
? 'genitive'
: 'nominative'
);
return $words[$nounCase][$index] ?? null;
},
'weekdays_short' => ['??', '??', '??', '??', '??', '??', '??'],
'weekdays_min' => ['??', '??', '??', '??', '??', '??', '??'],
'first_day_of_week' => 1,
'day_of_first_week_of_year' => 1,
'list' => [', ', ' i '],
];
|