1: <?php
2:
3:
4: defined('_JOOS_CORE') or exit();
5:
6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17:
18: class pluginAutoadminTableDateFormat implements joosAutoadminPluginsTable
19: {
20: public static function render(joosModel $obj, array $element_param, $key, $value, stdClass $values, $option)
21: {
22: if (!isset($element_param['html_table_element_param']['date_format'])) {
23: throw new joosException('Для поля не указана строка форматирования date_format');
24: }
25:
26: $format = $element_param['html_table_element_param']['date_format'];
27:
28: $timestamp = strtotime($value);
29:
30: return joosDateTime::russian_date($format, $timestamp);
31: }
32:
33: }
34: