diff --git a/basis/calendar/calendar.factor b/basis/calendar/calendar.factor index ef22a98c80..90d087eda8 100644 --- a/basis/calendar/calendar.factor +++ b/basis/calendar/calendar.factor @@ -171,6 +171,10 @@ M: timestamp easter ( timestamp -- timestamp ) : microseconds ( x -- duration ) 1000000 / seconds ; : nanoseconds ( x -- duration ) 1000000000 / seconds ; +GENERIC: >duration ( obj -- duration ) +M: duration >duration ; +M: integer >duration seconds ; + GENERIC: year ( obj -- n ) M: integer year ; M: timestamp year year>> ;