Fix Stammtisch date generation script

This commit is contained in:
Stefan Schlott 2014-01-16 11:59:51 +01:00
parent e70e096354
commit 84e90fa456

View file

@ -31,8 +31,13 @@ for month in 1..12
else else
date + (9-date.wday) date + (9-date.wday)
end end
firstwednesday = if (date.wday<=3)
date + (3-date.wday)
else
date + (10-date.wday)
end
result['events'] << event(firsttuesday, 0, 'CCCS-Stammtisch (Zadu-Bar)', 'zadu') result['events'] << event(firsttuesday, 0, 'CCCS-Stammtisch (Zadu-Bar)', 'zadu')
result['events'] << event(firsttuesday, 15, 'CCCS-Stammtisch (shackspace)', 'shack') result['events'] << event(firstwednesday, 14, 'CCCS-Stammtisch (shackspace)', 'shack')
end end
puts result.to_yaml puts result.to_yaml