- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
function formatDate($mysqlDate, $time = false) {
$date = "";
if (is_int($mysqlDate))
$stamp = $mysqlDate;
else
$stamp = strtotime($mysqlDate);
$date .= date("j", $stamp) . " ";
$date .= $this->months[date("n", $stamp) - 1] . " ";
$thisYear = date("Y", time());
$year = date("Y", $stamp);
if ($thisYear != $year)
$date .= ", " . date("Y", $stamp);
if ($time)
$date .= " " . date("H:i", $stamp);
if ($time) return date("d/m/Y H:i");
else return date("d/m/Y");
return $date;
}
babaika 11.03.2010 15:41 # +3
guest 16.03.2010 04:13 # 0
(с) Чебурашка