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.31 2006/01/13 15:57:20 grubba Exp $ + // $Id: TimeRanges.pmod,v 1.32 2006/01/17 16:35:01 mbaehr 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:119:    }       error("%O.%O: Illegal parameters %O,%O,%O...\n",    function_object(this_program),    this_program,@args,0,0,0);    }       static void convert_from(TimeRange other)    {   // inheriting class must take care of size -  if (other->julian_day) -  { -  int|float jd=other->julian_day(); -  if (floatp(jd) && other->unix_time) +  if (other->unix_time)    create("unix_r",other->unix_time(),other->ruleset()); -  +  else if (other->julian_day) +  create("julian_r",other->julian_day(),other->ruleset());    else -  create("julian_r",jd,other->ruleset()); -  } -  else if (other->unix_time) -  create("unix_r",other->unix_time(),other->ruleset()); -  else +     error("Can't convert %O->%s.%O\n",other,    calendar_name(), this_program);    }      //! method TimeRange set_size(TimeRange size)   //! method TimeRange set_size(int n,TimeRange size)   //! Gives back a new (or the same, if the size matches)   //! timerange with the new size.   //! If <i>n</i> are given, the resulting size   //! will be <i>n</i> amounts of the given size.