diff --git a/src/Lang/ar.php b/src/Lang/ar.php index 0e96ab2..cb53bed 100644 --- a/src/Lang/ar.php +++ b/src/Lang/ar.php @@ -72,6 +72,12 @@ return [ 'jdate_before_equal' => 'يجب أن يكون :attribute تاريخ جلالي قبل :date أو يساوي.', 'jdatetime_before' => 'يجب أن يكون :attribute هو تاريخ جلالي قبل :date.', 'jdatetime_before_equal' => 'يجب أن يكون :attribute هو تاريخ جلالي قبل أو يساوي :date.', + ], + 'quarters' => [ + '1' => 'ربيع', + '2' => 'الصيف', + '3' => 'الخريف', + '4' => 'شتاء', ] ]; diff --git a/src/Lang/az.php b/src/Lang/az.php index cfe6519..83b069e 100644 --- a/src/Lang/az.php +++ b/src/Lang/az.php @@ -72,6 +72,12 @@ return [ 'jdate_before_equal' => ':attribute' . ' تاریخ شمسی باید قبل یا برابر از ' . ':date' . ' باشد.', 'jdatetime_before' => ':attribute' . ' تاریخ و زمان شمسی باید قبل از ' . ':date' . ' باشد.', 'jdatetime_before_equal' => ':attribute' . ' تاریخ و زمان شمسی باید قبل یا برابر از ' . ':date' . ' باشد.', + ], + 'quarters' => [ + '1' => 'بهار', + '2' => 'تابستان', + '3' => 'پاییز', + '4' => 'زمستان', ] ]; diff --git a/src/Lang/en.php b/src/Lang/en.php index 1220dbe..8d0e9b4 100644 --- a/src/Lang/en.php +++ b/src/Lang/en.php @@ -72,6 +72,12 @@ return [ 'jdate_before_equal' => 'The :attribute must be a Jalali date before or equal :date.', 'jdatetime_before' => 'The :attribute must be a Jalali datetime before :date.', 'jdatetime_before_equal' => 'The :attribute must be a Jalali datetime before or equal :date.', + ], + 'quarters' => [ + '1' => 'spring', + '2' => 'summer', + '3' => 'autumn', + '4' => 'winter', ] ]; diff --git a/src/Lang/fa.php b/src/Lang/fa.php index 9ad6e9d..15dcaad 100644 --- a/src/Lang/fa.php +++ b/src/Lang/fa.php @@ -72,6 +72,12 @@ return [ 'jdate_before_equal' => ':attribute' . ' تاریخ شمسی باید قبل یا برابر از ' . ':date' . ' باشد.', 'jdatetime_before' => ':attribute' . ' تاریخ و زمان شمسی باید قبل از ' . ':date' . ' باشد.', 'jdatetime_before_equal' => ':attribute' . ' تاریخ و زمان شمسی باید قبل یا برابر از ' . ':date' . ' باشد.', + ], + 'quarters' => [ + '1' => 'بهار', + '2' => 'تابستان', + '3' => 'پاییز', + '4' => 'زمستان', ] ]; diff --git a/src/Lang/haz.php b/src/Lang/haz.php index cc8d370..8d76699 100644 --- a/src/Lang/haz.php +++ b/src/Lang/haz.php @@ -72,6 +72,12 @@ return [ 'jdate_before_equal' => ':attribute' . ' تاریخ شمسی باید قبل یا برابر از ' . ':date' . ' باشد.', 'jdatetime_before' => ':attribute' . ' تاریخ و زمان شمسی باید قبل از ' . ':date' . ' باشد.', 'jdatetime_before_equal' => ':attribute' . ' تاریخ و زمان شمسی باید قبل یا برابر از ' . ':date' . ' باشد.', + ], + 'quarters' => [ + '1' => 'بهار', + '2' => 'تابستان', + '3' => 'پاییز', + '4' => 'زمستان', ] ]; diff --git a/src/Lang/ku.php b/src/Lang/ku.php index 87315a6..452c963 100644 --- a/src/Lang/ku.php +++ b/src/Lang/ku.php @@ -72,6 +72,12 @@ return [ 'jdate_before_equal' => ':attribute' . ' تاریخ شمسی باید قبل یا برابر از ' . ':date' . ' باشد.', 'jdatetime_before' => ':attribute' . ' تاریخ و زمان شمسی باید قبل از ' . ':date' . ' باشد.', 'jdatetime_before_equal' => ':attribute' . ' تاریخ و زمان شمسی باید قبل یا برابر از ' . ':date' . ' باشد.', + ], + 'quarters' => [ + '1' => 'بهار', + '2' => 'تابستان', + '3' => 'پاییز', + '4' => 'زمستان', ] ]; diff --git a/src/Lang/ps.php b/src/Lang/ps.php index 7e759f3..f5170a9 100644 --- a/src/Lang/ps.php +++ b/src/Lang/ps.php @@ -71,6 +71,12 @@ return [ 'jdate_before_equal' => ':attribute' . ' تاریخ شمسی باید قبل یا برابر از ' . ':date' . ' باشد.', 'jdatetime_before' => ':attribute' . ' تاریخ و زمان شمسی باید قبل از ' . ':date' . ' باشد.', 'jdatetime_before_equal' => ':attribute' . ' تاریخ و زمان شمسی باید قبل یا برابر از ' . ':date' . ' باشد.', + ], + 'quarters' => [ + '1' => 'بهار', + '2' => 'تابستان', + '3' => 'پاییز', + '4' => 'زمستان', ] ]; diff --git a/src/Traits/Formatting.php b/src/Traits/Formatting.php index 9fb6548..96840de 100644 --- a/src/Traits/Formatting.php +++ b/src/Traits/Formatting.php @@ -134,7 +134,10 @@ trait Formatting case 't': return static::isLeapYear( $pYear ) && ( $pMonth == 12 ) ? 30 : static::$daysMonthJalali[ intval( $pMonth ) - 1 ]; - + # Quarter + case 'Q': + case 'q': + return self::$messages['quarters'][$this->quarter]; # Years case 'L': return intval( $this->isLeapYear( $pYear ) ); @@ -291,6 +294,8 @@ trait Formatting "%n" => "\n", "%t" => "\t", "%%" => "%", + "%Q" => "q", + "%q" => "q" ); return str_replace(array_keys($strftime_date), array_values($strftime_date), $format);