Displaying 3 results from an estimated 3 matches for "end_on".
2006 May 23
3
ez-where headscratch
Hi there,
I''m puzzled by this apparently simple query I can''t manage to reassemble
using ez_where plugin.
cond = Caboose::EZ::Condition.new :my_table do
start_on < Time.now
any {end_on > Time.now; end_on.nil?}
end
I keep getting the following result :
>> cond.to_sql
=> ["my_table.start_on < ? AND (my_table.end_on > ?)", Tue May 23
17:11:43 CEST 2006, Tue May 23 17:11:43 CEST 2006]
while the expected result would be :
["my_table.start_on <...
2008 Jan 16
4
How to test if one range of dates overlaps another?
...laps" another range of dates. Does
anyone know a rails find or mysql select statement that will test for
this? Here are the details:
* Recurringcharge items have a start_date and an end_date that
represent the period of time that the charges should occur.
* Statement items have begin_on and end_on properties that represent
the period of time that is being billed for.
In order to create a statements, I need to see which recurringcharges
occur within the statement period.
I''ve been racking my brains, but can''t seem to come up with the
elegant way to do this. Any ideas?
--~...
2007 Apr 29
2
Validate unique within date range?
...unction to check this (the query is easy enough), but I''m not
sure where to put it or how to integrate it with your standard
Special.new call and all that.
The models in question:
Product
:id
:name
:description
:category
:price
Special
:id
:product_id
:start_on (date)
:end_on (date)
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@pub...