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

int icaltime_is_valid_time ( const struct icaltimetype  t  ) 

Returns false if the time is clearly invalid, but is not null. This is usually the result of creating a new time type buy not clearing it, or setting one of the flags to an illegal value.

Returns false if the time is clearly invalid, but is not null. This is usually the result of creating a new time type buy not clearing it, or setting one of the flags to an illegal value.

Definition at line 778 of file icaltime.c.

                                                       {
    if(t.is_utc > 1 || t.is_utc < 0 ||
       t.year < 0 || t.year > 3000 ||
       t.is_date > 1 || t.is_date < 0){
      return 0;
    } else {
      return 1;
    }

}


Generated by  Doxygen 1.6.0   Back to index