Set operations between events are what make the grammar of schedules so
powerful. For example, on_mday(25) & on_wday("Mon")
takes the
intersection of these two events, resulting in a new event that only occurs
when the 25th day of the month is also a Monday.
&
/ event_intersect()
: Take the intersection of two events, creating a
new event that occurs when both x
and y
occured.
|
/ event_union()
: Take the union of two events, creating a
new event that occurs when either x
or y
occured.
-
/ event_difference()
: Take the difference of two events, creating a
new event that occurs when x
occured, but y
did not.
!
/ event_invert()
: Invert an event, creating a
new event that occurs when x
did not occur.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | event_intersect(x, y)
event_union(x, y)
event_diff(x, y)
event_invert(x)
## S3 method for class 'event'
e1 & e2
## S3 method for class 'event'
e1 | e2
## S3 method for class 'event'
e1 - e2
## S3 method for class 'event'
!x
|
x, y, e1, e2 |
Events to perform a set operation on. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.