| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | class DateTime extends \DateTime { |
||
| 22 | /** |
||
| 23 | * MySQL datetime foramt. |
||
| 24 | * |
||
| 25 | * @see https://dev.mysql.com/doc/en/datetime.html |
||
| 26 | * @see https://github.com/Rarst/wpdatetime/blob/0.3/src/WpDateTime.php#L10 |
||
| 27 | * |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | const MYSQL = 'Y-m-d H:i:s'; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Format I18N. |
||
| 34 | * |
||
| 35 | * @see https://github.com/Rarst/wpdatetime/blob/0.3/src/WpDateTimeTrait.php#L79-L104 |
||
| 36 | * @see https://github.com/WordPress/WordPress/blob/4.9.4/wp-includes/functions.php#L72-L151 |
||
| 37 | * |
||
| 38 | * @param string|null $format Format. |
||
| 39 | * |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | public function format_i18n( $format = null ) { |
||
| 54 |