Address.php
5 years ago
Color.php
5 years ago
Company.php
5 years ago
DateTime.php
5 years ago
Internet.php
5 years ago
Payment.php
5 years ago
Person.php
5 years ago
PhoneNumber.php
5 years ago
DateTime.php
47 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Faker\Provider\tr_TR; |
| 4 | |
| 5 | class DateTime extends \Faker\Provider\DateTime |
| 6 | { |
| 7 | public static function amPm($max = 'now') |
| 8 | { |
| 9 | return static::dateTime($max)->format('a') === 'am' ? 'öö' : 'ös'; |
| 10 | } |
| 11 | |
| 12 | public static function dayOfWeek($max = 'now') |
| 13 | { |
| 14 | $map = array( |
| 15 | 'Sunday' => 'Pazar', |
| 16 | 'Monday' => 'Pazartesi', |
| 17 | 'Tuesday' => 'Salı', |
| 18 | 'Wednesday' => 'Çarşamba', |
| 19 | 'Thursday' => 'Perşembe', |
| 20 | 'Friday' => 'Cuma', |
| 21 | 'Saturday' => 'Cumartesi', |
| 22 | ); |
| 23 | $week = static::dateTime($max)->format('l'); |
| 24 | return isset($map[$week]) ? $map[$week] : $week; |
| 25 | } |
| 26 | |
| 27 | public static function monthName($max = 'now') |
| 28 | { |
| 29 | $map = array( |
| 30 | 'January' => 'Ocak', |
| 31 | 'February' => 'Şubat', |
| 32 | 'March' => 'Mart', |
| 33 | 'April' => 'Nisan', |
| 34 | 'May' => 'Mayıs', |
| 35 | 'June' => 'Haziran', |
| 36 | 'July' => 'Temmuz', |
| 37 | 'August' => 'Ağustos', |
| 38 | 'September' => 'Eylül', |
| 39 | 'October' => 'Ekim', |
| 40 | 'November' => 'Kasım', |
| 41 | 'December' => 'Aralık', |
| 42 | ); |
| 43 | $month = static::dateTime($max)->format('F'); |
| 44 | return isset($map[$month]) ? $map[$month] : $month; |
| 45 | } |
| 46 | } |
| 47 |