@prefix cal: <http://www.w3.org/2002/12/cal/ical#> .
@prefix log: <http://www.w3.org/2000/10/swap/log#>.

@prefix : <#>.


#
# If a timezone is used in a component of a calendar,
# then it's a component of the calendar.
#
cal:Vtimezone :path cal:dtstart, cal:dtend.

{
  ?TZ a cal:Vtimezone.
  cal:Vtimezone :path ?P.
  ?CAL cal:component [ ?P [ ?TZ [] ] ].
} => { ?CAL cal:component ?TZ }.


#
# grab timezone info from the web
#
this log:forAll :S, :P, :O.

cal:Vtimezone :prop
  cal:tzid,
  cal:standard, cal:tzoffsetfrom, cal:tzoffsetto, cal:tzname,
  cal:dtstart, cal:dateTime, cal:rrule, cal:bymonth, cal:freq, cal:byday,
  cal:interval, cal:daylight.

{
  ?TZ a cal:Vtimezone;
    log:racine [ log:semantics ?TZF ].
  cal:Vtimezone :prop :P.
  ?TZF log:includes { :S :P :O }
}
 => { :S :P :O }.



