iCalendar File Format (ICS) repeat an event every 2 weeks on Sun, except for the 3rd Sun of the Month - icalendar

Is it possible to do this?
This will repeat every 2 weeks:
RRULE:FREQ=WEEKLY;INTERVAL=2;WKST=SU
This will repeat on every 1st/3rd/5th Sun:
RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=1SU,3SU,5SU
What I need is something like this (every 2 weeks, except 3rd Sun):
RRULE:FREQ=WEEKLY;INTERVAL=2;WKST=SU;BYDAY=-3SU

Related

SAP Business Objects - Calculating services activity across months

I have a requirement to calculate a persons total activity, for each month that they have activity. I'll give a couple of examples to demonstrate my needs:
Client A - Service starts 15th April and ends 5th June. They are scheduled to receive 7 hours per week of activity.
Client B - Service Starts 15th April and ends 20th April. They are scheduled to receive 14 hours per week.
Given the above I would want a table that shows the following:
Clients
April Hrs
May Hrs
June Hrs
Client A
16
31
5
Client B
10
Total Activity
26
31
5
Currently we are having to calculate each month individually and stack up the table with each months data. Is there a way to generate this calculation across months, taking into account the start dates, end dates, and commissioned hours activity per week and calculate the actual received activity in each month?
Thanks in advance!

iCalendar repeat rule for x days before the 2nd Tuesday in the month

I have a meeting on every 2nd Tuesday of the month.
I need 10 days to prepare that meeting - this means I would need a recurring event "10 days before the 2nd Tuesday of the month"
(added via ical file)
I found iCalendar repeat rule for "the day after the second monday of the month" but I'm not sure how/if this applies to my situation/how to remodel it to fit my needs.
The issue is that since it's 10 days prior it may even be in the previous month in some cases (e.g. if the first day of the month is a Tuesday)
What is the correct command for this?
EDIT: the time is always from 8-10am just so it can be included.

How to calculate the weekend when counting a date range in Google Sheets?

I have the below columns
StartDate EndDate CountDay
01 May 20 05 May 20 ?
As you see, 01 May is Friday, so from 01-05 May if we count all days including weekend it will be 4 days.
What I want is on column "CountDay" it only counts the Workdays, not the weekend.
SO the expected result would be 2.
Anyone know how to do it using a formula in Google Sheets?
Do you consider Fridays as part of the weekend?
If yes, then you could also try the following formula:
=NETWORKDAYS.INTL(A10, B10,"0000111")
If not, please use this formula:
=NETWORKDAYS.INTL(A10, B10)
How the formulas work.
By using the function NETWORKDAYS.INTL we can "adjust" the weekend (non-working weekdays) to our liking.
In this case we account Fridays as our non-working weekdays by using as the 3rd parameter 0000111 instead of the default 0000011 where every 0 represents a working weekday and every 1 a non-working weekday.
(Very useful for people working part-time)
Someone who has part-time work on only Mondays, Wednesdays and Fridays and wants to calculate the working days Friday, 1 May 2020 - Tuesday, 30 June 2020 could adjust the formula to:
=NETWORKDAYS.INTL(A10, B10,"0101011")
As explained on the official Google help page for NETWORKDAYS.INTL
weekend – [ OPTIONAL – 1 by default ] – A number or string representing which days of the week are considered weekends.
String method: Weekends can be specified using seven 0s and 1s, where the first number in the set represents Monday and the last number is for Sunday. A zero means that the day is a work day, a 1 means that the day is a weekend. For example, “0000011” would mean Saturday and Sunday are weekends.
Number method: Instead of using the string method above, a single number can be used. 1 = Saturday/Sunday are weekends, 2 = Sunday/Monday and this pattern repeats until 7 = Friday/Saturday. 11 = Sunday is the only weekend day, 12 = Monday is the only weekend day and this pattern repeats until 17 = Saturday is the only weekend day.
I just found how to do it:
=if(weeknum(A10)<weeknum(B10),B10-A10-2*(weeknum(B10)-weeknum(A10)),B10-A10)
something like that

List of dates (Every 2 weeks) that includes the first of the month as well

I am trying to come up with a simple formula that I can extend infinitely to show me a list of dates that is separated by 2 weeks (14 days) and also includes the first of the month. The 2 weeks part is easy to accomplish with:
=A2+14
Where A2 has a date in the field to start the calculations. Then I can extend that down the column to have:
=A3+14
=A4+14
And so on... The hard part is, I also want to include the first of each month. So the list should include every other Friday and the first of the month dynamically. So the results would be like this:
2/28/2020
3/01/2020
3/13/2020
3/27/2020
4/01/2020
4/10/2020
As you can see from this list, it looks at every other Friday AND the first of the month is included in the results. I tried something like this:
=IF(MONTH(A3+14)>MONTH(A3),eomonth(A3+14,-1)+1,A2+14)
The issue from this one is that if the first of the month condition gets selected, the next date is 14 days AFTER the first of the month. It should be 14 days after the previous Friday.
try:
=ARRAYFORMULA(SORT(UNIQUE({
EOMONTH(ROW(INDIRECT(C1&":"&C2)), 0)+1;
FILTER(ROW(INDIRECT(C1&":"&C2)),
MOD(ROW(INDIRECT("A1:A"&DAYS(C2, C1)+1)), 14)=0)+1})))

Quartz - schedule jobs every two Weeks regardless of the start time

What is the cron expression for the following schedule :
Monday and Tuesday at 8:00 am, every 2 weeks.
Can we define "Every 3 weeks" regardless of the the start time ? (I don't care if it's every 3 weeks starting from the first week of the month or year, I want to run it for 5 years and literally every 3 weeks)
You can't find a cron expression that meets your schedule.
For example this howto states, that:
You need a SimpleTrigger or CalendarIntervalTrigger to schedule
biweekly fire points.
I think you need two Simple Triggers to define a schedule like "Monday and Tuesday at 8:00 am every 2 weeks", namely one biweekly trigger for each monday, and just like that one biweekly trigger for each tuesday.
Similarly you could tackle the "Every 3 weeks" problem.