sql - RRULE explanaiton using BYDAY and BYSETPOS -
I am trying to parse an RRULE and show how many weeks the recurrence event is valid in the month. I have seen RFC 2445 Dock () and this is not clear.
I know the rules for example:
RRULE FREQ = monthly, INTERVAL = 1; BYDAY = TH, FR, WE; BYSETPOS = 10,11,12,7,8,9,1,2,3,4,5,6 Mercury, substrate, for Friday is the first of the month, second, Third and fourth week.
or
RRULE FREQ = monthly, INTERVAL = 1; BYDAY = TU, MO; BYSETPOS = 3, 4,5,6; The second and third week of the month is for Monday and Tuesday.
or
RRULE FREQ = customer, interval = 1; BYDAY = TH, WE; BYSETPOS = -1, -2 The last week of the month is for Mercury and Thursday.
I created this through another program, but I'm not sure how it actually generates.
In this way the problem I'm having is understanding that BYSETPOS should be able to parse an RRULE as the last goal again for one month as above and display:
For: RRULE FREQ = MONTHLY, INTERVAL = 1; BYDAY = TH, FR, WE; BYSETPOS = 10,11,12,7,8,9,1,2,3,4,5,6 Show: Tu in week, Friday, Mercury: 1 , 2,3,4 For: RRULE FREQ = Monthly, INTERVAL = 1; BYDAY = TU, MO; BYSETPOS = 3,4,5,6; Show: Tuesday, Monday to Week: 2,3 For: RRULE FREQ = Monthly, INTERVAL = 1 ; BYDAY = TH, we; BYSETPOS = -1, -2 Show: Hu, last week Wednesday The best solution would be a string Objective-C, But I can understand that it is a different kind of language. It will also be an explanation of how good BYDETPOS work with BYDAY will be.
Problems like this. I understand that BYSETPOS is a repeat week for one month. Describes how.
BYSETPOS does not represent weeks, but after calculating examples corresponding to the remaining rule only nth example. For example, FREQ = monthly, INTERVAL = 1; BYDAY = TU, MO corresponds to tuesdays of every month and every month. So for each month, you first calculate a set (eg if you take it on July 9, 2014) then BYSETPOS lets you "index" in the set, which you should keep 1, -2, which means set Last 2 entries in To continue with the example of July 2014, the base rule will return the following set: (1, 7, 8, 14, 15, 21, 22, 28, 29 July). Looking at BYSETPOS = 1,2, -1, -2, we will keep the 1, 7, 28th, 29th of July.
You want to see which unreleased RFC 2245 is more detailed description of the rule.
Comments
Post a Comment