def years
		if @mode == :all
			return @years
		end

		months = case @mode
		when :half
			[('01'..'06'), ('07'..'12')][@month.to_i - 1].to_a
		when :quarter
			[['01', '02', '03'], ['04', '05', '06'], ['07', '08', '09'], ['10', '11', '12']][@month.to_i - 1]
		when :month
			[@month]
		else
			('01'..'12').to_a
		end

		r = {}
		(@year ? [@year] : @years.keys).each do |y|
			r[y] = months
		end
		r
	end
def years
		if @mode == :all
			return @years
		end

		months = case @mode
		when :half
			[('01'..'06'), ('07'..'12')][@month.to_i - 1].to_a
		when :quarter
			[['01', '02', '03'], ['04', '05', '06'], ['07', '08', '09'], ['10', '11', '12']][@month.to_i - 1]
		when :month
			[@month]
		else
			('01'..'12').to_a
		end

		r = {}
		(@year ? [@year] : @years.keys).each do |y|
			r[y] = months
		end
		r
	end
return ym_spec

 {"yyyy" => ["mm", ...], ...}

 date spec:
  (1) none               -> all diary
  (2) month=xH           -> all diary in xH of all year
  (3) year=YYYY;month=xH -> all diary in YYYY/xH
  (4) month=xQ           -> all diary in xQ of all year
  (5) year=YYYY;month=xQ -> all diary in YYYY/xQ
  (6) month=MM           -> all diary in MM of all year
  (7) year=YYYY;month=MM -> all diary in YYYY/MM
  (8) year=YYYY          -> all diary in YYYY