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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/YMD.pmod:900:    ({z[i]->set_size(uq,sec)})+    map(z[i..sizeof(z)-2],"add",uq,sec);    i++;    }    uo=z[i]->utc_offset();    }    }    return z;    }    + //! method Second second() + //! method Second second(int n) + //! method Minute minute(int hour,int minute,int second) + //! method array(Second) seconds() + //! method array(Second) seconds(int first,int last) + //! method int number_of_seconds() + //! method Minute minute() + //! method Minute minute(int n) + //! method Minute minute(int hour,int minute) + //! method array(Minute) minutes() + //! method array(Minute) minutes(int first,int last) + //! method int number_of_minutes() + //! method Hour hour() + //! method Hour hour(int n) + //! method array(Hour) hours() + //! method array(Hour) hours(int first,int last) + //! method int number_of_hours()       int number_of_hours() { return (number_of_seconds()+3599)/3600; }    cHour hour(void|int n) { return get_unit("hour",n); }    array(cHour) hours(int ...range)    { return get_timeofday("hours",0,3600,Hour,@range); }       int number_of_minutes() { return (number_of_seconds()+59)/60; }    cMinute minute(void|int n,int ... time)    {    if (sizeof(time)) -  +  { +  if (n==number_of_hours()) +  return (hour(-1)+1)->minute(time[0]);    return hour(n)->minute(time[0]); -  +  }    return get_unit("minute",n);    }    array(cMinute) minutes(int ...range)    { return get_timeofday("minutes",0,60,Minute,@range); }       int number_of_seconds() { return end()->unix_time()-unix_time(); }    cSecond second(void|int n,int ...time)    {    if (sizeof(time)==2) -  +  { +  if (n==number_of_hours()) +  return (hour(-1)+1)->minute(time[0])->second(time[1]);    return hour(n)->minute(time[0])->second(time[1]); -  +  }    return get_unit("second",n);    }    array(cSecond) seconds(int ...range)    { return get_timeofday("seconds",0,1,Second,@range); }       float number_of_fractions() { return (float)number_of_seconds(); }    cSecond fraction(void|float|int n)    {    return fractions()[0];    }