mirror of
https://github.com/getformwork/formwork.git
synced 2025-02-24 17:52:41 +01:00
19 lines
737 B
PHP
19 lines
737 B
PHP
<?php
|
|
|
|
return [
|
|
'date' => static function (int $timestamp, string $format = null): string {
|
|
return \Formwork\Utils\Date::formatTimestamp(
|
|
$timestamp,
|
|
$format ?? \Formwork\Core\Formwork::instance()->config()->get('date.format'),
|
|
\Formwork\Admin\Admin::instance()->translation()->code()
|
|
);
|
|
},
|
|
'datetime' => static function (int $timestamp): string {
|
|
return \Formwork\Utils\Date::formatTimestamp(
|
|
$timestamp,
|
|
\Formwork\Core\Formwork::instance()->config()->get('date.format') . ' ' . \Formwork\Core\Formwork::instance()->config()->get('date.hour_format'),
|
|
\Formwork\Admin\Admin::instance()->translation()->code()
|
|
);
|
|
}
|
|
];
|