Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

In the Create Work Effort screen, type "Car Payment" in the Name field. Select Event for the Type, select Confirmed for the Status, select General for the Scope, and use the Calendar icon to set Estimated Start Date to January 1, 2010. Scroll down the screen to find the Temporal Expression field. Select DAYOFMONTH_15. Click Save. The Car Payment calendar event has been created. To view it, click the Calendar tab, then select Month View. You will see the the car payment due date appear every 15th of the month.

Create A Complicated Recurring Event

Wiki MarkupYou like to play soccer. You like to play soccer *so much* you practice four days a week - Monday, Tuesday, Wednesday, and Saturday. The Monday through Wednesday practices are at 6 PM, and the Saturday practice is at 10 AM. On the last Saturday of the month a lacrosse team uses the field you practice on, so your teammates agreed to reschedule that practice to 1 PM Sunday. \ [Having a soccer team surrender a field to a lacrosse team is a supreme act of charity - one that your team is immensely proud of.\] There is one other exception to the schedule your teammates agreed on: If a practice falls on Saint Patrick's Day, the practice is canceled (since it is very unlikely anyone would show up).

Now, you have no problem remembering your soccer practice schedule. The problem is, no one else can remember it - so you decide to add it to your calendar. If anyone wants to know when you are at soccer practice, all they have to do is check your calendar.

...

Code Block
  Difference:
    Include:
      SubstitutionUnion:
        IncludeIntersection:
          Union:MinuteRange(0, 0)
            Intersection:HourRange(18, 18)
              MinuteRange(0DayOfWeekRange(Monday, 0Wednesday)
              HourRange(18, 18)Substitution:
              DayOfWeekRange(Monday, Wednesday)Include:
            Intersection:
              MinuteRange(0, 0)
              HourRange(10, 10)
              DayOfWeekRange(Saturday, Saturday)
          Exclude:
            DayInMonth(Saturday, -1)
          Substitute:
            Intersection:
              MinuteRange(0, 0)
              HourRange(13, 13)
              DayOfWeekRange(Sunday, Sunday)
    Exclude:
      Intersection:
        DayOfMonthRange(17, 17)
        MonthRange(3, 3)

Complicated temporal expressions like this need to be built from the inside out. So, to start off you will create the Monday through Wednesday intersection, the Saturday intersection, the Sunday intersection, and the Saint Patrick's Day intersection. Finally, you will assemble the intersections into the Union, Substitution, and Difference collections.

In the Find Temporal Expression screen, click Create. In the Temporal Expression Maintenance screen, find the Day Of Week Range section. Type MON_THRU_WED in the Expression ID field. Select Monday for the From field and select Wednesday for the To field. Click the Save button. Go back to the Find Temporal Expression screen, and click Create. In the Temporal Expression Maintenance screen, find the Intersection section. Type MON_THRU_WED_6PM in the Expression ID field and click the Save button. Now you can add member expressions to the intersection. Select MINUTE_00 in the Include field and click Save. Select HOUR_18 in the Include field and click Save. Select MON_THRU_WED in the Include field and click Save. Your Monday through Wednesday at 6PM intersection is finished.

In the Find Temporal Expression screen, click Create. In the Temporal Expression Maintenance screen, find the Intersection section. Type SAT_10AM in the Expression ID field and click the Save button. Now you can add member expressions to the intersection. Select MINUTE_00 in the Include field and click Save. Select HOUR_10 in the Include field and click Save. Select DAYOFWEEK_07 in the Include field and click Save. Your Saturday at 10AM intersection is finished.

In the Find Temporal Expression screen, click Create. In the Temporal Expression Maintenance screen, find the Intersection section. Type SUN_1PM in the Expression ID field and click the Save button. Now you can add member expressions to the intersection. Select MINUTE_00 in the Include field and click Save. Select HOUR_13 in the Include field and click Save. Select DAYOFWEEK_01 in the Include field and click Save. Your Sunday at 1PM intersection is finished.

In the Find Temporal Expression screen, click Create. In the Temporal Expression Maintenance screen, find the Intersection section. Type MARCH_17 in the Expression ID field and click the Save button. Now you can add member expressions to the intersection. Select DAYOFMONTH_17 in the Include field and click Save. Select MONTH_RANGE_03 in the Include field and click Save. Your March 17th intersection is finished.

In the Find Temporal Expression screen, click Create. In the Temporal Expression Maintenance screen, find the Day In Month section. Type LAST_SATURDAY in the Expression ID field. Select -1 for the Occurrence field and Saturday for the Day field. Click Save. Your last Saturday of the month expression is finished.

In the Find Temporal Expression screen, click Create. In the Temporal Expression Maintenance screen, find the Substitution section. Type SOCCER_SUBST in the Expression ID field and click the Save button. Now you can add member expressions to the substitution. Select SAT_10AM in the Include field and click Save. Select LAST_SATURDAY in the Exclude field and click Save. Select SUN_1PM in the Substitution field and click Save. Your soccer practice Saturday substitution is finished.

In the Find Temporal Expression screen, click Create. In the Temporal Expression Maintenance screen, find the Union section. Type SOCCER_UNION in the Expression ID field and click the Save button. Now you can add member expressions to the union. Select MON_THRU_WED_6PM in the Include field and click Save. Select SOCCER_SUBST in the Include field and click Save. Your Monday, Tuesday, Wednesday, and Saturday union is finished.

In the Find Temporal Expression screen, click Create. In the Temporal Expression Maintenance screen, find the Difference section. Type SOCCER_PRACTICE in the Expression ID field and click the Save button. Now you can add member expressions to the difference. Select SOCCER_UNION in the Include field and click Save. Select MARCH_17 in the Exclude field and click Save. Your soccer practice temporal expression is finished.

In the Create Work Effort screen, type "Soccer Practice" in the Name field. Select Event for the Type, select Confirmed for the Status, select General for the Scope, and use the Calendar icon to set Estimated Start Date to January 1, 2010. Scroll down the screen to find the Temporal Expression field. Select SOCCER_PRACTICE. Click Save. The Soccer Practice calendar event has been created. To view it, click the Calendar tab, then select Month View. You will see the soccer schedule. Notice how the last Saturday of the month has been rescheduled. Scroll through the months to get to March 2010. Notice how practice has been canceled on March 17th.