]> git.wh0rd.org Git - tt-rss.git/commitdiff
smart_date_time() display fix
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 2 Dec 2005 16:33:41 +0000 (17:33 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 2 Dec 2005 16:33:41 +0000 (17:33 +0100)
functions.php

index d36ee849e06010c4f1fdb556c0c179205d33d39d..6b606057338b47411f10ad755106f329d64dbf6c 100644 (file)
        function smart_date_time($timestamp) {
                if (date("Y.m.d", $timestamp) == date("Y.m.d")) {
                        return date("G:i", $timestamp);
-               } else if (date("Y.m", $timestamp) == date("Y.m")) {
+               } else if (date("Y", $timestamp) == date("Y")) {
                        return date("M d, G:i", $timestamp);
                } else {
                        return date("Y/m/d G:i");
        function smart_date($timestamp) {
                if (date("Y.m.d", $timestamp) == date("Y.m.d")) {
                        return "Today";
-               } else if (date("Y.m", $timestamp) == date("Y.m")) {
+               } else if (date("Y", $timestamp) == date("Y")) {
                        return date("D m", $timestamp);
                } else {
                        return date("Y/m/d");