|
|
@ -21,9 +21,9 @@ class Format |
|
|
|
/* Date & time */ |
|
|
|
static protected $time_format = 'H:i:s'; |
|
|
|
static protected $date_format = 'd.m.Y'; |
|
|
|
static protected $today_format = 'Сегодня'; |
|
|
|
static protected $today_format = 'd.m.Y'; //disabled by default
|
|
|
|
static protected $date_time_format = 'H:i d.m.Y'; |
|
|
|
static protected $today_time_format = 'H:i Сегодня'; |
|
|
|
static protected $today_time_format = 'H:i d.m.Y'; //disabled by default
|
|
|
|
static protected $timezone_offset = 0; |
|
|
|
|
|
|
|
/* money */ |
|
|
@ -118,11 +118,23 @@ class Format |
|
|
|
* Установка форматов даты |
|
|
|
* |
|
|
|
*/ |
|
|
|
static public function setDateTimeFormat($date_time_format, $today_time_format = false) |
|
|
|
static public function setDateFormat($date_time_format, $date_format = false) |
|
|
|
{ |
|
|
|
self::$date_time_format = $date_time_format; |
|
|
|
if ($today_time_format) { |
|
|
|
self::$today_time_format = $today_time_format; |
|
|
|
if ($date_format) { |
|
|
|
self::$date_format = $date_format; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Установка форматов даты для текущего дня |
|
|
|
* |
|
|
|
*/ |
|
|
|
static public function setTodayFormat($today_time_format, $today_format = false) |
|
|
|
{ |
|
|
|
self::$today_time_format = $today_time_format; |
|
|
|
if ($today_format) { |
|
|
|
self::$today_format = $today_format; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|