So Sysadmin Day is on the last Friday in July every year. I wanted to add this to a Google Calendar (GUI), but for the year 2014 (July 25) it would always mark it as the fourth Friday. This was problematic since July 2015 has five (5) Fridays. By the way, it worked just fine if I started the event in July 2015.
After some initial searching, I ran across a few resources with hints, but these were focused on the last (week)day of the year:
- StackExchange Web Applications: How to make a task repeat on the last day of each month in Google Calendar?
- Google Groups: Last day of month repeating event!!!!
- Google Groups: Why an event set to repeat on say 31st(or last day) of each month does not work
I decided to roll up my sleeves and give it a whirl in ics format. I started to read up on RFC 2445 “Internet Calendaring and Scheduling Core Object Specification (iCalendar)” over at IETF. After realizing it was 148 pages long I decided to create a working event in the calendar, export it, extract and modify the event, then import the event back into the calendar. This worked.
Source & How-To
And now the ICS source for System Administrator Appreciate Day:
- BEGIN/END VCALENDAR: Entire calendar encapsulation. (Hmm, I wonder if multiple calendars will work? Need to read the spec.)
- BEGIN/END VEVENT: Single event encapsulation within the specific calendar.
- DTSTART: The start date of the event; this is an all-day event so there is no time nor timezone.
- DTEND: Like DTSTART, only for when the event will end – this is the next day for an all-day event.
- RRULE: This is the bread’n’butter. The frequency is monthly every 12 months (so once per year) on the last (-1) Friday (FR); 1FR would be the first Friday, 2FR would be the second, -2FR would the second-to-last Friday, etc. See §4.3.10 “Recurrence Rule” on page 40 of RFC 2445 to start.
- SUMMARY: The formal name (title) of the event.