In using #set_recurring_events, I have discovered that it does not
currently support one common type of recurrence unit: events on the Nth
day-of-week every X months.  For instance:

First Wednesday of every month
Second Friday every 3 months

This is proposal for adding this functionality.  I've been through the
code and believe I see how to cleanly add what is necessary to calculate
the string of events according to these rules.  The real question is how
to make it easy to specify this type of recurrence in the call to
#set_recurring_events.  I propose the following:

1) The value "month" for argument "unit" is changed to "monthdate" (with
"month" being deprecated but maintained for some long period of time as
a synonym for "monthdate").  These values maintain the current meaning
of "month": the event recurs on the same date (day of month) in each
month. There is no change in functionality here, only a change in the
name of the argument so it is more clear what it does when compared to
the following new value.

2) The argument "unit" gets a new value, "monthday". This value
indicates a recurrence on the same day each month (i.e., Nth
day-of-week) as opposed to the same date each month.

3) A new argument is added, "dayofweek". This argument is only used in
calculations when unit=monthday, in which case it is required. This new
"dayofweek" argument can accept the following values: "Monday",
"Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday".

4) A new argument is added, "weekofmonth". This argument is also only
used in calculations when unit=monthday, in which case it is required.
This new "weekofmonth" argument can accept the following numeric values:
1, 2, 3, 4, 5.  It indicates which dayofweek in the month is to be used,
i.e., if dayofweek=Saturday and weekofmonth=3, this indicates the third
Saturday of each month.

5) The existing "period" argument is used as it is currently, to
indicate gaps between occurrences of the event, in this case something
like "second Friday every 3 months" instead of every month.

6) The page http://semantic-mediawiki.org/wiki/Help:Recurring_events is
updated to reflect these changes, and additional examples are given to
clarify the difference between "monthdate" and "monthday".


The initial implementation would not be localized, but that work could
follow after a stable release of the proposed functionality if desired.


All thoughts welcomed!

-Al




------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to