From 6f3fad5864bb1bf2e40ab9c12379a4c657a7a3fd Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Wed, 8 Jul 2015 14:26:00 +0800 Subject: [PATCH] Adding comments --- app/jobs/update_user_invoices.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/jobs/update_user_invoices.rb b/app/jobs/update_user_invoices.rb index 2e636fdf5a..7a3a2c83cc 100644 --- a/app/jobs/update_user_invoices.rb +++ b/app/jobs/update_user_invoices.rb @@ -1,5 +1,7 @@ UpdateUserInvoices = Struct.new("UpdateUserInvoices", :year, :month) do def start_date + # Start at the beginning of the specified month + # or at the beginning of the month (prior to midnight last night) if none specified @start_date ||= if month && year Time.new(year, month) else @@ -8,6 +10,8 @@ UpdateUserInvoices = Struct.new("UpdateUserInvoices", :year, :month) do end def end_date + # Stop at the end of the specified month + # or at midnight last night if no month is specified @end_date ||= if month && year Time.new(year, month) + 1.month else