blob: a8633fef0e512c859473ef8edefc4251872cc2d3 [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?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 * - Milos Sakovic
15 * - Paul
16 * - Pete Scopes (pdscopes)
17 */
18return [
19 /*
20 * {1}, {0} and ]1,Inf[ are not needed as it's the default for English pluralization.
21 * But as some languages are using en.php as a fallback, it's better to specify it
22 * explicitly so those languages also fallback to English pluralization when a unit
23 * is missing.
24 */
25 'year' => '{1}:count year|{0}:count years|]1,Inf[:count years',
26 'a_year' => '{1}a year|{0}:count years|]1,Inf[:count years',
27 'y' => '{1}:countyr|{0}:countyrs|]1,Inf[:countyrs',
28 'month' => '{1}:count month|{0}:count months|]1,Inf[:count months',
29 'a_month' => '{1}a month|{0}:count months|]1,Inf[:count months',
30 'm' => '{1}:countmo|{0}:countmos|]1,Inf[:countmos',
31 'week' => '{1}:count week|{0}:count weeks|]1,Inf[:count weeks',
32 'a_week' => '{1}a week|{0}:count weeks|]1,Inf[:count weeks',
33 'w' => ':countw',
34 'day' => '{1}:count day|{0}:count days|]1,Inf[:count days',
35 'a_day' => '{1}a day|{0}:count days|]1,Inf[:count days',
36 'd' => ':countd',
37 'hour' => '{1}:count hour|{0}:count hours|]1,Inf[:count hours',
38 'a_hour' => '{1}an hour|{0}:count hours|]1,Inf[:count hours',
39 'h' => ':counth',
40 'minute' => '{1}:count minute|{0}:count minutes|]1,Inf[:count minutes',
41 'a_minute' => '{1}a minute|{0}:count minutes|]1,Inf[:count minutes',
42 'min' => ':countm',
43 'second' => '{1}:count second|{0}:count seconds|]1,Inf[:count seconds',
44 'a_second' => '{1}a few seconds|{0}:count seconds|]1,Inf[:count seconds',
45 's' => ':counts',
46 'millisecond' => '{1}:count millisecond|{0}:count milliseconds|]1,Inf[:count milliseconds',
47 'a_millisecond' => '{1}a millisecond|{0}:count milliseconds|]1,Inf[:count milliseconds',
48 'ms' => ':countms',
49 'microsecond' => '{1}:count microsecond|{0}:count microseconds|]1,Inf[:count microseconds',
50 'a_microsecond' => '{1}a microsecond|{0}:count microseconds|]1,Inf[:count microseconds',
51 'µs' => ':countµs',
52 'ago' => ':time ago',
53 'from_now' => ':time from now',
54 'after' => ':time after',
55 'before' => ':time before',
56 'diff_now' => 'just now',
57 'diff_today' => 'today',
58 'diff_yesterday' => 'yesterday',
59 'diff_tomorrow' => 'tomorrow',
60 'diff_before_yesterday' => 'before yesterday',
61 'diff_after_tomorrow' => 'after tomorrow',
62 'period_recurrences' => '{1}once|{0}:count times|]1,Inf[:count times',
63 'period_interval' => 'every :interval',
64 'period_start_date' => 'from :date',
65 'period_end_date' => 'to :date',
66 'months' => ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
67 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
68 'weekdays' => ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
69 'weekdays_short' => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
70 'weekdays_min' => ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
71 'ordinal' => function ($number) {
72 $lastDigit = $number % 10;
73
74 return $number.(
75 (~~($number % 100 / 10) === 1) ? 'th' : (
76 ($lastDigit === 1) ? 'st' : (
77 ($lastDigit === 2) ? 'nd' : (
78 ($lastDigit === 3) ? 'rd' : 'th'
79 )
80 )
81 )
82 );
83 },
84 'list' => [', ', ' and '],
85 'first_day_of_week' => 0,
86 'day_of_first_week_of_year' => 1,
87];