Logo Search packages:      
Sourcecode: libical version File versions

int icaltime_compare_date_only ( const struct icaltimetype  a_in,
const struct icaltimetype  b_in 
)

like icaltime_compare, but only use the date parts.

like icaltime_compare, but only use the date parts.

Definition at line 880 of file icaltime.c.

References icaltimezone_get_utc_timezone().

{
    int retval;
    struct icaltimetype a, b;
    icaltimezone *tz = icaltimezone_get_utc_timezone();

    a = icaltime_convert_to_zone(a_in, tz);
    b = icaltime_convert_to_zone(b_in, tz);

    if (a.year > b.year)
      return 1;
    else if (a.year < b.year)
      return -1;

    if (a.month > b.month)
      return 1;
    else if (a.month < b.month)
      return -1;

    if (a.day > b.day)
      return 1;
    else if (a.day < b.day)
      return -1;

    return 0;
}


Generated by  Doxygen 1.6.0   Back to index