Logo Search packages:      
Sourcecode: libical version File versions

int icaltime_compare_date_only_tz ( const struct icaltimetype  a_in,
const struct icaltimetype  b_in,
icaltimezone *  tz 
)

like icaltime_compare, but only use the date parts.

like icaltime_compare, but only use the date parts; accepts timezone.

Definition at line 912 of file icaltime.c.

{
    int retval;
    struct icaltimetype a, b;

    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