I am building a PTO form and need to add up the number of hours of PTO requested and also sort by day. The issue is I need to automatically remove weekend days. For example. If I request PTO from July 31-August 4th. That should be 3 days x 8 hours or 24 hours, not 5 days x 8 hours or 40 hours. Is there a way to have javascript recognize days that are weekends and automatically delete them?
My thought is that the script would see 5 days (40 Hours), then see that there are two days that are weekend days (16 hours). That way when it generates the email for approval it only shows 16 hours. Also, when it gets to Laserfiche, I can use metadata to create an exchange task that adds those days to a corporate vacation calendar.