Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Yanick (3196)

  (email not shown publicly)

Journal of Yanick (3196)

Saturday March 10, 2007
01:00 PM

Meeting Availability Dialect

[ #32641 ]


Organizing the March meeting of, I came across the problem that setting a date is pretty much like playing Battleship. If a specific date is proposed, people tend respond with boolean answers (can/can't come on that day), which is perfect to assess the punctual value of the attendency function, but quite lousy to determine its monthly optimum.

So, taking the premise that there's no simple problem that can't be solved by an overcomplex solution, I thought about a way we could all signal our availabilities for a certain month in a simple, standard and easy to parse way (for I have evil plans to hack a script to help me do the scheduling). A few bus commutes later, MADness was born.

Meeting Availability Dialect

A MAD signature line has the following syntax:

                month : availability

The month is simply the name of the month. Availability is defined by a sequence of tokens that add or remove available days, depending if they are modified by a plus or minus sign.


                April : WD + Sat - Wed - Day(13)

which means any work day, plus Satudays, but not Wednesdays or the 13th of the month.

The base token are:

AD - Any day
WE - Week-end (same as 'Sat + Sun')
WD - Week days (same as 'Mon + Tue + Wed + Thu + Fri')

For a specific date, use Day(X), where X is the date. For example, 'WD - Day(14)' means all week days, except on the 14th (one can surmise that was for February).

To target a specific week, append '(X)' to the token, where X is the week in question. Several weeks can be given, separated by commas or a range operator '..'. For example, 'Tue - Tue(2)' is equivalent to 'Tue(1,3..4)' and means the first, third or fourth Tuesday of the month.

Availability is resolved from left to right, which means that, for example,

                April : AD - WE + Sun(1)

means any day, except week-ends, although the first Sunday is okay. Note that
this is equivalent to

                April: WD + Sun(1)

MAD doesn't consider whitespaces as significant. The full availability, however, must be represented on a single line.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.