pike.git / lib / modules / Calendar.pmod / TimeRanges.pmod

version» Context lines:

pike.git/lib/modules/Calendar.pmod/TimeRanges.pmod:1:   //! module Calendar    - // $Id: TimeRanges.pmod,v 1.36 2008/11/04 15:49:23 mast Exp $ + // $Id: TimeRanges.pmod,v 1.37 2009/08/19 09:09:12 grubba Exp $      #pike __REAL_VERSION__      #define zero int(0..0)      program SuperTimeRange=cSuperTimeRange;      string calendar_name() { return "TimeRanges"; }      object calendar_object=this;
pike.git/lib/modules/Calendar.pmod/TimeRanges.pmod:252:   //! </pre>   //!   //! note:   //! a-b does not give the distance between the start of a and b.   //! Use the <ref>distance</ref>() function to calculate that.   //!   //! The integer used to `+, `- and add are the <i>number</i>   //! of steps the motion will be. It does <i>never</i> represent   //! any <i>fixed</i> amount of time, like seconds or days.    -  TimeRange `+(program|this_program|int n) +  TimeRange `+(program|this_program|int n, +  program|this_program|int ... more)    { -  +  if (sizeof(more)) n = predef::`+(n, @more);    if (objectp(n)) return add(1,n);    return add(n);    }    -  TimeRange ``+(int n) +  TimeRange ``+(int n, int ... more)    { -  +  if (sizeof(more)) n = predef::`+(n, @more);    return add(n);    }    -  TimeRange `-(TimeRange|program|int n) +  TimeRange `-(program|this_program|int n, +  TimeRange|this_program|int ... more)    { -  +  if (sizeof(more)) n = predef::`+(n, @more);    if (objectp(n)) return add(-1,n);    return add(-n);    }      //! method TimeRange next()   //! method TimeRange prev()   //! Next and prev are compatible and convinience functions;   //! <tt>a->next()</tt> is exactly the same as <tt>a+1</tt>;   //! <tt>a=a->next()</tt> is <tt>a++</tt>.