]> gitweb.factorcode.org Git - factor.git/commitdiff
calendar.format: don't need unix-time>relative-time.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 30 Jul 2015 17:34:49 +0000 (10:34 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 30 Jul 2015 17:34:49 +0000 (10:34 -0700)
unix-time>timestamp relative-time

extra/calendar/elapsed/elapsed.factor
extra/hacker-news/hacker-news.factor

index 9f9c375ab31566297157357e75fdecf3167e29a4..34c781846c06a1d1274e297793dc1ccca9906973 100644 (file)
@@ -55,13 +55,3 @@ M: duration relative-time
 
 M: timestamp relative-time
     now swap time- relative-time ;
-
-
-GENERIC: unix-time>relative-time ( unix-seconds -- string )
-
-M: real unix-time>relative-time
-    seconds since-1970 unix-time>relative-time ;
-
-M: timestamp unix-time>relative-time
-    [ now ] dip
-    time- duration>seconds relative-time ;
index 45b3360684a66e5f841d474e2c7ddac458378971..396a0525655ee246bb0c864f6cb0942dd828d66c 100644 (file)
@@ -57,7 +57,7 @@ PRIVATE>
         [ post>url host>> " (" ")" surround write-text nl ]
         [ "score" of "    %d points" sprintf write-text ]
         [ dup "by" of [ " by " write-text [ "by" of ] [ post>user-url ] bi write-link ] [ drop ] if ]
-        [ "time" of [ " " write-text unix-time>relative-time write-text ] when* ]
+        [ "time" of [ " " write-text unix-time>timestamp relative-time write-text ] when* ]
         [
             dup "descendants" of [
                 " | " write-text