]> gitweb.factorcode.org Git - factor.git/commitdiff
calendar.parser: simplify hms>duration
authorAlexander Iljin <ajsoft@yandex.ru>
Sun, 14 May 2017 21:04:52 +0000 (00:04 +0300)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 22 Jan 2018 15:58:17 +0000 (07:58 -0800)
basis/calendar/parser/parser.factor

index eb0a7324081f32a6bf1bf26ef368bf41ec388e7e..b61ec74fb0b6d1524515fcb3a1825d25f2f010a3 100644 (file)
@@ -169,5 +169,4 @@ MACRO: attempt-all-quots ( quots -- quot )
     [ instant read-00 >>hour read-00 >>minute ] with-string-reader ;
 
 : hms>duration ( str -- duration )
-    [ read-hms ] with-string-reader
-    instant swap >>second swap >>minute swap >>hour ;
+    [ 0 0 0 read-hms <duration> ] with-string-reader ;