title: Find event in specified calendar in AppleScript
body: <p>Hallo I am pretty new to AppleScript. I try to create attendance generator via pure AppleScript (I know I would use Microsoft Excel VBA for this I wan to use AppleScript only.).</p>
  
  <p>I have this kind of problem. I want to check if in current month are or are not some national holidays (calendar called "Státní svátky"). I run my code and get empty e.g., {} variable. Don't know what is wrong in my code.</p>
  
  <pre><code>-- My isholiday function; i parameter is pointer to day of month i want to test if it is or it is not a holiday
  on isholiday(i)
  
      -- Function global variables
      set today to current date
      set tomorrow to today + 60 * 60 * 24
  
      -- work with calendar app
      tell application "Calendar"
          tell calendar "Státní svátky" -- national holiday calendar in my iCloud 
              set currentEvent to every event whose start date is greater than or equal to today and start date is less than or equal to tomorrow
              return currentEvent
  
              -- when an event occurs it should tells me right
              if currentEvent is not {} then
                  display dialog "It is not empty!"
              end if
          end tell
      end tell
  end isholiday
  </code></pre>
  
  <p>-- caling the function - i picked 23 for purpose - I did testing event for that day e.g., i know it is not 100% empty
  isholiday(23)</p>
  
  <p>Please help me. Thank you!</p>
  
  <p>-- Michael</p>