]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/formatting/formatting.factor
move if-zero etc to math, remove 1-/1+ from math
[factor.git] / basis / formatting / formatting.factor
index 1b1bc8c2afb5cce2ccab3a9ba5e44c1eaced9056..40279749d64368592d9c416fb47257dae0412aa9 100644 (file)
@@ -138,7 +138,7 @@ MACRO: printf ( format-string -- )
 
 : (week-of-year) ( timestamp day -- n )
     [ dup clone 1 >>month 1 >>day day-of-week dup ] dip > [ 7 swap - ] when
-    [ day-of-year ] dip 2dup < [ 0 2nip ] [ - 7 / 1+ >fixnum ] if ;
+    [ day-of-year ] dip 2dup < [ 0 2nip ] [ - 7 / 1 + >fixnum ] if ;
 
 : week-of-year-sunday ( timestamp -- n ) 0 (week-of-year) ; inline