     unix-1970 (time-) 1000000 * >integer ;
 
 : now ( -- timestamp )
-    now-gmt gmt-offset-duration (time+) >>gmt-offset ;
+    now-gmt gmt-offset-duration [ (time+) ] [ >>gmt-offset ] bi ;
 
 : hence ( duration -- timestamp ) now swap time+ ;
 : ago ( duration -- timestamp ) now swap time- ;

ALIAS: last-day-of-week saturday

: day< ( timestamp quot -- timestamp )
    over clone [ call dup ] dip after=? [ -7 days (time+) drop ] when ; inline
: day<= ( timestamp quot -- timestamp )
    over clone [ call dup ] dip after? [ -7 days (time+) drop ] when ; inline
: day> ( timestamp quot -- timestamp )
    over clone [ call dup ] dip before=? [ 7 days (time+) drop ] when ; inline
: day>= ( timestamp quot -- timestamp )
    over clone [ call dup ] dip before? [ 7 days (time+) drop ] when ; inline

: sunday< ( timestamp -- timestamp ) [ sunday ] day< ;
: monday< ( timestamp -- timestamp ) [ monday ] day< ;

        [ day>>    +day    ]
        [ month>>  +month  ]
        [ year>>   +year   ]
     } cleave ; inline

PRIVATE>

GENERIC#: time+ 1 ( time1 time2 -- time3 )

M: timestamp time+ [ clone ] dip (time+) ;

: duration+ ( duration1 duration2 -- duration3 )
    {
