Logo Search packages:      
Sourcecode: libical version File versions  Download package

int icaltime_week_number ( const struct icaltimetype  ictt  ) 

Return the week number for the week the given time is within

Doesn't take into account the start day of the week. strftime assumes that weeks start on Monday.

Definition at line 662 of file icaltime.c.

References juldat().

      UTinstant jt;


      jt.year = ictt.year;
    jt.month = ictt.month;
    jt.day = ictt.day;
    jt.i_hour = 0;
    jt.i_minute = 0;
    jt.i_second = 0;


      return (jt.day_of_year - jt.weekday) / 7;

Generated by  Doxygen 1.6.0   Back to index