8 int first_day_of_week,
int first_day_of_year )
10 int year1, month1, hour, minute, second, week;
18 switch ( interval_type ) {
22 result = year2 - year1;
28 result = (month2 - month1) + (year2 - year1) * 12;
34 result = (
long long) (floor(serial2) - floor(serial1));
41 first_day_of_year, first_day_of_week );
44 first_day_of_year, first_day_of_week );
52 if( serial1 > serial2 ) {
53 double serial_tmp = serial1;
65 serial = serial2 - serial1;
67 result = (
long long) (hour + floor(serial) * 24.0l);
70 serial = serial2 - serial1;
72 result = (
long long) (minute + (hour + floor(serial) * 24.0
l) * 60.0l);
75 serial = serial2 - serial1;
77 result = (
long long) (second + (minute + (hour + floor(serial) * 24.0l) * 60.0l) * 60.0l);