Browse Source

Format class improved #31

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/legacy@91 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
master
akulikov 16 years ago
parent
commit
b3f7afa799
  1. 22
      classes/Format.class.php

22
classes/Format.class.php

@ -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;
}
}

Loading…
Cancel
Save