]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/calendar/calendar.factor
Using "same?" in more places.
[factor.git] / basis / calendar / calendar.factor
index 802e3ae10ef7ffc9cb3c54b17cc4e46c27c26f68..45644b035c8260874b31b7ab944c6468dda94aa0 100644 (file)
@@ -323,7 +323,7 @@ M: timestamp <=> ( ts1 ts2 -- n )
     [ >gmt tuple-slots ] compare ;
 
 : same-day? ( ts1 ts2 -- ? )
-    [ >gmt >date< <date> ] bi@ = ;
+    [ >gmt >date< <date> ] same? ;
 
 : (time-) ( timestamp timestamp -- n )
     [ >gmt ] bi@
@@ -463,7 +463,7 @@ M: timestamp day-name day-of-week day-names nth ;
 
 :: nth-day-this-month ( timestamp n day -- new-timestamp )
     timestamp beginning-of-month day day-this-week
-    dup timestamp [ month>> ] bi@ = [ 1 weeks time+ ] unless
+    dup timestamp [ month>> ] same? [ 1 weeks time+ ] unless
     n 1 - [ weeks time+ ] unless-zero ;
 
 : last-day-this-month ( timestamp day -- new-timestamp )