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

version» Context lines:

pike.git/lib/modules/Calendar.pmod/Badi.pmod:158:    return ({y,w,1,7,wjd+w*7});   // fixme   }      // identical to gregorian   protected int year_remaining_days(int y,int yday)   {    return 365+year_leap_year(y)-yday;   }    - //! function method int daystart_offset() + //! @decl int daystart_offset()   //! Returns the offset to the start of the time range object   //!   int daystart_offset()   {    return -21600; // 6 hours earlier   }      class cFraction   {    inherit YMD::cFraction;
pike.git/lib/modules/Calendar.pmod/Badi.pmod:537:    int unix_time()    {    return ::unix_time()+daystart_offset();    }       string vahid_name()    {    return sprintf("v%d", v);    }    -  string _sprintf(int t,mapping m) +  protected string _sprintf(int t,mapping m)    {    switch (t)    {    case 'O':   // if (n!=1)   // return sprintf("Vahid(%s)",nice_print_period());    return sprintf("Vahid(%s)",nice_print());    case 't':    return "Calendar."+calendar_name()+".Vahid";    default:    return ::_sprintf(t,m);    }    }       string nice_print()    {    return vahid_name();    }    - //! method Year year() - //! method Year year(int n) - //! method Year year(string name) - //! return a year in the vahid by number or name: + //! @decl Year year() + //! @decl Year year(int n) + //! @decl Year year(string name) + //! Return a year in the vahid by number or name:   //! - //! <tt>vahid-&gt;year("Alif")</tt> + //! @tt{vahid->year("Alif")@}    cYear year(int|string ... yp)    {    int num;    if (sizeof(yp) &&    stringp(yp[0]))    {    num=((int)yp[0]) ||    rules->language[f_year_number_from_name](yp[0]);    if (!num)    error("no such year %O in %O\n",yp[0],this);