This Google script helps you to know how much PTO time you have. Are you planning a big trip next August but aren't sure you're going to have enough PTO? This script will calculate it out for you! There's just a couple things you need to do to your Google Calendar first, then run this app and boom! You know if you can make that trip a reality!
Google Calendar Setup:
You should make a new Google Calendar that will have all your requested day off events, company holidays, and the PTO amount events that this program will create. All your day off requests should have the same name (ie: "requested off"). You should also have a unique way to identify company holidays that won't count against your PTO (ie: "company holiday"). Many companies will allow you to take off a half-day. You can do this by adding some text to the end of your requested time off event name (ie: "requested off halfday").
How much PTO do you get every 2 weeks? Every 2 weeks you get some more PTO to use. What is that amount?
How much PTO do you have right now? Your current amount of PTO.
What is the next day you get more PTO? What is the next day you accrue more PTO? This day and every 2 weeks later will get the PTO event with the current number of hours you have to spend added to your calendar.
How many PTO calendar events do you want to add? The PTO event is the calendar event that will show how many hours you currently have to spend. How many of these would you like to add?
What's the name of the calendar that will have your PTO amount events? The name of the calendar this program will add PTO events to. I like to have a separate Google calendar that keeps track of my PTO events. You can use your main calendar if you'd like, but I would recommend making a new calendar that only houses these PTO events.
What's the name of the calendar that has your day off requests? This is the name of the Google calendar that has your time off request events. My company has a separate calendar for time off requests (which is why this option even exists). It doesn't have to be a separate calender, though. It can be the same as the PTO Calendar above.
What is the name of events that represent company holidays? We usually get holidays off and they don't count against our PTO. You can make calendar events for holidays that you get off so that your total PTO won't get smaller. Example: You take off the full week of Christmas but your company gives you Christmas off (let's say it falls on a Tuesday). Your request off calendar event has you off the entire week, but really you only need to use 32 PTO hours. You can identify your company holiday as an event on Tuesday (with this text box's name) and this program will only remove 32 hours from your PTO (instead of 40). It should also be noted that weekend days are also NOT counted against your PTO.
What is the event name for your day-off request? This is the name of the calendar event that represents you taking time off.
Delete old PTO events up to this date: If you add 20 PRO events today and then come back and run the app again and only add 10 events, you will still have the previous (now outdated) events in your calendar. Set this date into the future and all PTO events up to that date will be deleted from your calendar before the program runs.