]> gitweb.factorcode.org Git - factor.git/commitdiff
hacker-news: fix typo with descendants. use unix-time>relative-time
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 30 Jul 2015 16:10:48 +0000 (09:10 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 30 Jul 2015 16:10:48 +0000 (09:10 -0700)
extra/hacker-news/hacker-news.factor

index 091c5f9f8d9a8519de8d6302c30b439d5f974f00..45b3360684a66e5f841d474e2c7ddac458378971 100644 (file)
@@ -57,14 +57,9 @@ 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 now timestamp>unix-time
-                swap - relative-time write-text
-            ] when*
-        ]
-        [
-            dup "decendants" of [
+            dup "descendants" of [
                 " | " write-text
                 [ "descendants" of [ "discuss" ] [ "%d comments" sprintf ] if-zero ]
                 [ post>comments-url ] bi write-link