On 1/4/06, Don Park <[EMAIL PROTECTED]> wrote:
> The meeting sounds interesting from the notes and slides posted so
> far. Is the podcast online yet?

http://pdxrb.podasp.com/archive.html

> don
> ps. pdxruby.org says "November 1st will be our next general meeting."
> That should probably be updated to read February 7th.

Someone else mentioned this last night.  How about we automatically
update the website via,

#!/usr/local/bin/ruby -w

require 'date'

class Calendar
     def initialize(year, month)
            @year = year
            @month = month
            @first_dow = Date.new(year, month, 1).wday
            @last_day = Date.new(year, month, -1).mday
            @dow = [[],[],[],[],[],[],[]]

            ([EMAIL PROTECTED]).each do |day|
                d = Date.new(year, month, day)
                @dow[d.wday] << d
            end
     end

     def [](day)
       return Date.new(@year, @month, day)
     end

     Date::DAYNAMES.each_with_index do |name, wday|
       class_eval "def #{name.downcase}; @dow[#{wday}]; end"
     end
end

now = DateTime.now
today = Date.new(now.year, now.month, now.day)
firsttues = Calendar.new(now.year, now.month).tuesday[0]

if today > firsttues
  if today.month == 12
    month = 1
    year = now.year+1
  else
    month = now.month+1
    year = now.year
  end
else
  month = now.month
  year = now.year
end

puts nextpdxrubytues = Calendar.new(year, month).tuesday[0] # first
tuesday of the month


I started with, http://www.zenspider.com/pipermail/ruby/2005-May/001952.html

Can you tell what part Ryan wrote and what part I wrote?  :-)
_______________________________________________
PDXRuby mailing list
[email protected]
IRC: #pdx.rb on irc.freenode.net
http://lists.pdxruby.org/mailman/listinfo/pdxruby

Reply via email to