         [ timestamp-year leap-year? ] keep
         [ >date< 3array ] keep timestamp-year 3 1 3array <=>
         0 >= and 1 0 ?
-    ] keep 
+    ] keep
     [ timestamp-month day-counts swap head-slice sum + ] keep
     timestamp-day + ;
 

    over timestamp-minute + 60 /rem pick
    set-timestamp-minute +hour ;
M: real +minute ( timestamp n -- timestamp )
    float>whole-part rot swap 60 * +second swap +minute ; 

M: number +second ( timestamp n -- timestamp )
    over timestamp-second + 60 /rem >r >bignum r>


: day-offset ( timestamp m -- timestamp n )
    over day-of-week - ; inline

: day-this-week ( timestamp n -- timestamp )
    day-offset days +dt ;

: sunday ( timestamp -- timestamp ) 0 day-this-week ;
: monday ( timestamp -- timestamp ) 1 day-this-week ;
: tuesday ( timestamp -- timestamp ) 2 day-this-week ;
: wednesday ( timestamp -- timestamp ) 3 day-this-week ;
: thursday ( timestamp -- timestamp ) 4 day-this-week ;
: friday ( timestamp -- timestamp ) 5 day-this-week ;
: saturday ( timestamp -- timestamp ) 6 day-this-week ;

{
    { [ unix? ] [ "calendar.unix" ] }
