[adelaide.pm] next perl mongers

Justin Hawkins justin at hawkins.id.au
Thu Apr 8 18:15:47 PDT 2010


On 03/03/2010, at 9:58 AM, Justin Hawkins wrote:

> Let me sum up a few points from discussion to see if there is any vehement agreement or disagreement:
> 
> * Regular, fixed in advance social meetings
> 
> Maybe on the same DOW (Friday for maximum social-ness?) or maybe not. But they happen every month, hell or high water. Or drought.


I wrote some code (huzzah) for social meeting dates. Actually I wrote very little code (DateTime::Set is cool). Here's the result:

2010-05-26 Wednesday
2010-06-24 Thursday
2010-07-26 Monday
2010-08-26 Thursday
2010-09-24 Friday
2010-10-26 Tuesday
2010-11-26 Friday
2010-12-24 Friday
2011-01-26 Wednesday
2011-02-24 Thursday
2011-03-24 Thursday
2011-04-26 Tuesday
2011-05-26 Thursday
2011-06-24 Friday
2011-07-26 Tuesday
2011-08-26 Friday
2011-09-26 Monday
2011-10-26 Wednesday
2011-11-24 Thursday
2011-12-26 Monday

DOW distrubution

   Monday: 3
  Tuesday: 3
Wednesday: 3
 Thursday: 6
   Friday: 5

Basically the algorithm is to have it on the 26th of each month, moving it backwards 2 days if it happens to fall on a weekend.

This gives us a bias towards end of the week. The algorithm is also simple enough to calculate 'by hand' if necessary and spreads it out over the week (I know many people can never make it on particular days of the week).

I need to devise a solution to the 'falls on a public holiday' thing, but that's easy enough. Probably either just skip for that month (nooo!) or move it another day backward. 

	- Justin

-- 
Justin Hawkins
justin at hawkins.id.au





More information about the Adelaide-pm mailing list