I am new to getting my own scripts up and running. Long time mac user though. I am trying to get a way to simply count the number of days in multiday, nonconsecutive events in several different calendars. I tried getting one through an AI portal but can’t make it work. Looking for something easy to click, enter the date range and what specific criteria I am looking to get. The employee may have call for 4 or 5 days then off for a couple of weeks. When setting up the call schedule I am trying to make it so that I can keep call days equal without having to manually count the days.
Here is the example
Employee 1 call days
Employee 2 call days
Employee 3 call days
Employee 4 call days
Employee 5 call days
Date range start:
Date range end:
Can anyone help direct me with using automator to do this? or if there is an app out there that will do this integrating with iCAT I would use that instead. Thanks.
Now iCal is called “Calendar”. Apple changed the name in macOS 10.7.
We can not get the selected events from Calendar.app’s GUI.
So, we input start and end date via a kind of calendar dialog ( I wrote it).
I don’t understand what you want to calculate.
If you describe what you want, you can write it by Automator or AppleScript or the other tools.
I want to calculate the number of days an employee is on call in a given date range.
There are probably a few ways of going about this. The specifics, though, require more detail of how your data is setup.
For example, do you have one calendar per employee, so you need to correlate across multiple calendars?
Or do you have a single calendar, with some identifier in the event to identify the employee?
You also reference ‘multi-day, non-consecutive events’ - does this mean if an employee is on call for three consecutive days there is one event that spans all days? or are there three separate events, one per day?
Also, bear in mind that any Calendar script will be point-in-time… only able to reference the calendar as it was when the script last ran. it won’t auto-update when new events are added (for example if the script runs and somehow tells you that Bob and Joe have 10 on-call days in a given period, but Andy only has 5, you might schedule Andy for additional days, but the script won’t know about that change until it’s re-run - there’s no dynamic update here. For that you might consider a spreadsheet approach (where this kind of thing is easy), or a dedicated employee time-tracking application.