bagder: curl-www nicedate.pm,1.1,1.2

[email protected]
Newsgroups gmane.comp.web.curl.www.cvs
Message-ID <[email protected]>
Update of /cvsroot/curl/curl-www
In directory labb.contactor.se:/tmp/cvs-serv29096

Modified Files:
	nicedate.pm 
Log Message:
provide simpler date strings, since mirroring of this may cause the data
to be up to 24 hours old so no "today" or "yday" etc


Index: nicedate.pm
===================================================================
RCS file: /cvsroot/curl/curl-www/nicedate.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- nicedate.pm	19 Dec 2004 22:20:39 -0000	1.1
+++ nicedate.pm	19 Dec 2004 22:33:23 -0000	1.2
@@ -32,19 +32,9 @@
                         $mday, $ord[ $mday % 20 ], $mname[$mon],
                         $hour, $min);
     }
-    elsif ($mday != $now[3]) {
-        if ( $mday == $yday[3] ) {
-            # yesterday
-            $str = sprintf( "yday %02d:%02d", $hour, $min );
-        }
-        else {
-            # last week
-            $str = sprintf( "%s %02d:%02d", $dname[$wday], $hour, $min );
-        }
-    }
     else {
-        # same day
-        $str = strftime( "%H:%M", @then );
+        # last week
+        $str = sprintf( "%s %02d:%02d", $dname[$wday], $hour, $min );
     }
     
     return $str;

_______________________________________________
http://cool.haxx.se/mailman/listinfo/curl-www-commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.