# Tries to find out whether an appointment (02/10/2007 11:00-12:00) is possible
PREFIX dc:
PREFIX cal:
PREFIX rdf:
ASK {
?x dc:title ?title.
?x cal:date ?y
?y cal:startDay ?start.
?y cal:endDay ?end.
?y cal:startTime ?sTime.
?y cal:endTime ?eTime
FILTER (regex(?start,"2007-10-[0-9]{2}")).
FILTER (!((?start = ?end && ?start = "2007-10-02" && ?sTime <"12:00" && ?eTime > "11:00" )||
(?start != ?end && ?start = "2007-10-02" && ?sTime <"12:00")||
(?start != ?end && ?end = "2007-10-02" && ?eTime > "11:00" )||
(?start < "2007-10-02" && ?end > "2007-10-02"))).
}