# File lib/vpim/date.rb, line 204
  def DateGen.bymonthday(year, month, mday)
    months = month ? [ month ] : 1..12
    dates = [ ]

    months.each do |m|
      begin
        dates << Date.new(year, m, mday)
      rescue ArgumentError
        # Don't generate dates for invalid combinations (Feb 29, when it's not
        # a leap year, for example).
        #
        # TODO - should we raise when month is out of range, or mday can never
        # be in range (32)?
      end
    end
    dates
  end