8 int first_day_of_week )
14 weekday =
fb_Weekday( serial, first_day_of_week );
15 serial -= weekday - 1;
22 int first_day_of_year,
int first_day_of_week )
24 int first_week_year, first_week_month, first_week_day;
25 double serial_week_begin, serial_year_begin;
26 int remaining_weekdays;
37 first_week_year = year;
44 remaining_weekdays = (int) ((serial_week_begin + 7.0
l) - serial_year_begin);
46 switch( first_day_of_year ) {
50 if( remaining_weekdays < 4 ) {
51 serial_week_begin += 7.0l;
55 if( remaining_weekdays < 7 ) {
56 serial_week_begin += 7.0l;
61 return serial_week_begin;
66 int first_day_of_year,
int first_day_of_week )
70 double serial_first_week;
76 first_day_of_year, first_day_of_week );
78 serial = floor( serial - serial_first_week);
81 week = (int) (serial + sign);
91 first_day_of_year, first_day_of_week );
94 first_day_of_year, first_day_of_week );
95 return (
int) ((serial_end - serial_start) / 7.0
l);