diff --git a/src/Provider/fa_IR/DateTime.php b/src/Provider/fa_IR/DateTime.php new file mode 100644 index 0000000000..c76106bdbd --- /dev/null +++ b/src/Provider/fa_IR/DateTime.php @@ -0,0 +1,43 @@ + 'یکشنبه', + 'Monday' => 'دوشنبه', + 'Tuesday' => 'سه شنبه', + 'Wednesday' => 'چهارشنبه', + 'Thursday' => 'پنج شنبه', + 'Friday' => 'جمعه', + 'Saturday' => 'شنبه', + ]; + $week = static::dateTime($max)->format('l'); + + return $map[$week] ?? $week; + } + + public static function monthName($max = 'now') + { + $map = [ + 'January' => 'دی', + 'February' => 'بهمن', + 'March' => 'اسفند', + 'April' => 'فروردین', + 'May' => 'اردیبهشت', + 'June' => 'خرداد', + 'July' => 'تیر', + 'August' => 'مرداد', + 'September' => 'شهریور', + 'October' => 'مهر', + 'November' => 'آبان', + 'December' => 'آذر', + ]; + $month = static::dateTime($max)->format('F'); + + return $map[$month] ?? $month; + } +}