D
Daniel Waite
Hi all. Observe:
(Date.today..Date.today + 90).to_a.size # ~90
That operation is, unfortunately, slow. Well, when you're calling it
100+ times it's slow.
Is there a way to get at the result of that operation (an integer) with
two date objects? e.g.
class AccountTransaction
attr_accessor osted
def day_count(date)
(posted..date).to_a.size
end
end
Any ideas?
(Date.today..Date.today + 90).to_a.size # ~90
That operation is, unfortunately, slow. Well, when you're calling it
100+ times it's slow.
Is there a way to get at the result of that operation (an integer) with
two date objects? e.g.
class AccountTransaction
attr_accessor osted
def day_count(date)
(posted..date).to_a.size
end
end
Any ideas?