Created
April 4, 2012 17:10
-
-
Save chadstachowicz/2303890 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| time = Date.new(pyear, pmonth).to_time | |
| monthname = Date::MONTHNAMES[time.month] | |
| month = "%02d" % params[:month] | |
| @gift_users = Cisco::TerminationCallDetail.initialize("1").find(:all, :conditions => ['DateTime >= ? AND DateTime <= ?', Date.new(pyear, pmonth).at_beginning_of_month, Date.new(pyear, pmonth).at_end_of_month]) | |
| Date.new(pyear, pmonth).at_beginning_of_month.upto(Date.new(pyear, pmonth).at_end_of_month).each do |date| | |
| #totalcounts << @gift_users.select{|u| u.datetime.to_s =~ /#{date.to_s}/ }.size | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment