Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This file is part of the Carbon package. |
| 5 | * |
| 6 | * (c) Brian Nesbitt <brian@nesbot.com> |
| 7 | * |
| 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | * file that was distributed with this source code. |
| 10 | */ |
| 11 | |
| 12 | /* |
| 13 | * Authors: |
| 14 | * - Adam |
| 15 | * - monkeycon |
| 16 | * - François B |
| 17 | * - Jason Katz-Brown |
| 18 | * - Chris Lam |
| 19 | * - Serhan Apaydın |
| 20 | * - Gary Lo |
| 21 | * - JD Isaacks |
| 22 | * - Chris Hemp |
| 23 | * - Eddie |
| 24 | * - KID |
| 25 | * - shankesgk2 |
| 26 | * - Daniel Cheung (danvim) |
| 27 | */ |
| 28 | return [ |
| 29 | 'year' => ':count:optional-space年', |
| 30 | 'y' => ':count:optional-space年', |
| 31 | 'month' => ':count:optional-space個月', |
| 32 | 'm' => ':count:optional-space月', |
| 33 | 'week' => ':count:optional-space週', |
| 34 | 'w' => ':count:optional-space週', |
| 35 | 'day' => ':count:optional-space天', |
| 36 | 'd' => ':count:optional-space天', |
| 37 | 'hour' => ':count:optional-space小時', |
| 38 | 'h' => ':count:optional-space小時', |
| 39 | 'minute' => ':count:optional-space分鐘', |
| 40 | 'min' => ':count:optional-space分鐘', |
| 41 | 'second' => ':count:optional-space秒', |
| 42 | 'a_second' => '{1}幾秒|]1,Inf[:count:optional-space秒', |
| 43 | 's' => ':count:optional-space秒', |
| 44 | 'ago' => ':time前', |
| 45 | 'from_now' => ':time後', |
| 46 | 'after' => ':time後', |
| 47 | 'before' => ':time前', |
| 48 | 'diff_now' => '現在', |
| 49 | 'diff_today' => '今天', |
| 50 | 'diff_yesterday' => '昨天', |
| 51 | 'diff_tomorrow' => '明天', |
| 52 | 'formats' => [ |
| 53 | 'LT' => 'HH:mm', |
| 54 | 'LTS' => 'HH:mm:ss', |
| 55 | 'L' => 'YYYY/MM/DD', |
| 56 | 'LL' => 'YYYY年M月D日', |
| 57 | 'LLL' => 'YYYY年M月D日 HH:mm', |
| 58 | 'LLLL' => 'YYYY年M月D日dddd HH:mm', |
| 59 | ], |
| 60 | 'calendar' => [ |
| 61 | 'sameDay' => '[今天] LT', |
| 62 | 'nextDay' => '[明天] LT', |
| 63 | 'nextWeek' => '[下]dddd LT', |
| 64 | 'lastDay' => '[昨天] LT', |
| 65 | 'lastWeek' => '[上]dddd LT', |
| 66 | 'sameElse' => 'L', |
| 67 | ], |
| 68 | 'ordinal' => function ($number, $period) { |
| 69 | switch ($period) { |
| 70 | case 'd': |
| 71 | case 'D': |
| 72 | case 'DDD': |
| 73 | return $number.'日'; |
| 74 | case 'M': |
| 75 | return $number.'月'; |
| 76 | case 'w': |
| 77 | case 'W': |
| 78 | return $number.'周'; |
| 79 | default: |
| 80 | return $number; |
| 81 | } |
| 82 | }, |
| 83 | 'meridiem' => function ($hour, $minute) { |
| 84 | $time = $hour * 100 + $minute; |
| 85 | if ($time < 600) { |
| 86 | return '凌晨'; |
| 87 | } |
| 88 | if ($time < 900) { |
| 89 | return '早上'; |
| 90 | } |
| 91 | if ($time < 1130) { |
| 92 | return '上午'; |
| 93 | } |
| 94 | if ($time < 1230) { |
| 95 | return '中午'; |
| 96 | } |
| 97 | if ($time < 1800) { |
| 98 | return '下午'; |
| 99 | } |
| 100 | |
| 101 | return '晚上'; |
| 102 | }, |
| 103 | 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], |
| 104 | 'months_short' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], |
| 105 | 'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], |
| 106 | 'weekdays_short' => ['週日', '週一', '週二', '週三', '週四', '週五', '週六'], |
| 107 | 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], |
| 108 | 'first_day_of_week' => 1, |
| 109 | 'day_of_first_week_of_year' => 4, |
| 110 | 'list' => '', |
| 111 | ]; |