rem: case ICAL_DATETIMEDATE_VALUE: case ICAL_TIME_VALUE:
context: icalvalue_compare(icalvalue* a, icalvalue *b){    struct icalvalue_impl *impla = (struct icalvalue_impl *)a;    struct icalvalue_impl *implb = (struct icalvalue_impl *)b;    icalerror_check_arg_rz( (a!=0), "a");    icalerror_check_arg_rz( (b!=0), "b");    /* Not the same type; they can only be unequal */    if( ! (icalvalue_is_time(a) && icalvalue_is_time(b)) &&	icalvalue_isa(a) != icalvalue_isa(b)){	return ICAL_XLICCOMPARETYPE_NOTEQUAL;    }    switch (icalvalue_isa(a)){	case ICAL_ATTACH_VALUE:	case ICAL_BINARY_VALUE:	case ICAL_BOOLEAN_VALUE:	{	    if (icalvalue_get_boolean(a) == icalvalue_get_boolean(b)){		return ICAL_XLICCOMPARETYPE_EQUAL;	    } else {		return ICAL_XLICCOMPARETYPE_NOTEQUAL;	    }	}	case ICAL_FLOAT_VALUE:	{	    if (impla->data.v_float > implb->data.v_float){		return ICAL_XLICCOMPARETYPE_GREATER;	    } else if (impla->data.v_float < implb->data.v_float){		return ICAL_XLICCOMPARETYPE_LESS;	    } else {		return ICAL_XLICCOMPARETYPE_EQUAL;	    }	}	case ICAL_INTEGER_VALUE:	case ICAL_UTCOFFSET_VALUE:	{	    if (impla->data.v_int > implb->data.v_int){		return ICAL_XLICCOMPARETYPE_GREATER;	    } else if (impla->data.v_int < implb->data.v_int){		return ICAL_XLICCOMPARETYPE_LESS;	    } else {		return ICAL_XLICCOMPARETYPE_EQUAL;	    }	}	case ICAL_DURATION_VALUE: 	{	    int a = icaldurationtype_as_int(impla->data.v_duration);	    int b = icaldurationtype_as_int(implb->data.v_duration);	    if (a > b){		return ICAL_XLICCOMPARETYPE_GREATER;	    } else if (a < b){		return ICAL_XLICCOMPARETYPE_LESS;	    } else {		return ICAL_XLICCOMPARETYPE_EQUAL;	    }	}	    	case ICAL_TEXT_VALUE:	case ICAL_URI_VALUE:	case ICAL_CALADDRESS_VALUE:	case ICAL_TRIGGER_VALUE:	case ICAL_DATE_VALUE:	case ICAL_DATETIME_VALUE:	case ICAL_DATETIMEDATE_VALUE:	case ICAL_TIME_VALUE:	case ICAL_DATETIMEPERIOD_VALUE:	{	    int r;	    r =  strcmp(icalvalue_as_ical_string(a),			  icalvalue_as_ical_string(b));	    if (r > 0) { 			return ICAL_XLICCOMPARETYPE_GREATER;	    } else if (r < 0){		return ICAL_XLICCOMPARETYPE_LESS;	    } else {		return ICAL_XLICCOMPARETYPE_EQUAL;	    }			}	case ICAL_METHOD_VALUE:	{	    if (icalvalue_get_method(a) == icalvalue_get_method(b)){		return ICAL_XLICCOMPARETYPE_EQUAL;	    } else {		return ICAL_XLICCOMPARETYPE_NOTEQUAL;	    }	}	case ICAL_STATUS_VALUE:	{	    if (icalvalue_get_status(a) == icalvalue_get_status(b)){		return ICAL_XLICCOMPARETYPE_EQUAL;	    } else {		return ICAL_XLICCOMPARETYPE_NOTEQUAL;	    }	}	case ICAL_PERIOD_VALUE:	case ICAL_GEO_VALUE:	case ICAL_RECUR_VALUE:	case ICAL_NO_VALUE:	default:	{	    icalerror_warn("Comparison not implemented for value type");	    return ICAL_XLICCOMPARETYPE_REGEX+1; /* HACK */	}    }   }