This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

accept either one of DateTime/Time

  • Loading branch information...
ruckus committed Mar 14, 2012
1 parent 80f4ecf commit 81c97092557a33307d76370a2e16da92e6df0956
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/quickeebooks/service/filter.rb
@@ -57,11 +57,11 @@ def number_to_s
def date_time_to_s
clauses = []
if @before
- raise ':before is not a valid Time object' unless @before.is_a?(Time)
+ raise ':before is not a valid DateTime/Time object' unless (@before.is_a?(Time) || @before.is_a?(DateTime))
clauses << "#{@field} :BEFORE: #{formatted_time(@before)}"
end
if @after
- raise ':after is not a valid Time object' unless @after.is_a?(Time)
+ raise ':after is not a valid DateTime/Time object' unless (@after.is_a?(Time) || @after.is_a?(DateTime))
clauses << "#{@field} :AFTER: #{formatted_time(@after)}"
end

0 comments on commit 81c9709

Please sign in to comment.