date searches

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

date searches

French, Shelane
I have an events apps. We have recently added an end date so events can
span multiple days. We don't have "repeating" events otherwise, just
spanning.

Anyways, previously with just one date, I had these parameters like:
events=today, events=thisweek, events=thismonth
Then I would take those parameters to build my inline (a standard inline).

For today I came up with this:
$params->merge(array(-lte, 'eventDate'=$thisDate));
        $params->merge(array(-gte, 'endDate'=$thisDate));




That works to pull up an event that is today as well as an event that
began 4/15 and ends 5/31.

I'm having a hard time coming up with the "this week" and "this month"
params. I do already have a way to determine the first and last day of the
week as well as first and last of the month. It's just getting those
events that span this.


#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: date searches

Tim Taplin
So, for display of all events that intersect with "this week":

eventDate <= last day of week
and endDate >= first day of week

similar for month.

I'm running that thru my head and it seems that it should match for you.

Tim Taplin

On Apr 26, 2013, at 10:48 AM, "French, Shelane" <[hidden email]> wrote:

> I have an events apps. We have recently added an end date so events can
> span multiple days. We don't have "repeating" events otherwise, just
> spanning.
>
> Anyways, previously with just one date, I had these parameters like:
> events=today, events=thisweek, events=thismonth
> Then I would take those parameters to build my inline (a standard inline).
>
> For today I came up with this:
> $params->merge(array(-lte, 'eventDate'=$thisDate));
> $params->merge(array(-gte, 'endDate'=$thisDate));
>
>
>
>
> That works to pull up an event that is today as well as an event that
> began 4/15 and ends 5/31.
>
> I'm having a hard time coming up with the "this week" and "this month"
> params. I do already have a way to determine the first and last day of the
> week as well as first and last of the month. It's just getting those
> events that span this.
>
>
> #############################################################
>
> Attend the Lasso Developer Conference 2013!
> Sept 12-14, 2013 in Niagara Falls, Canada
> http://www.lassosoft.com/LDC-niagara-falls-2013
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: date searches

French, Shelane
Thanks Tim. That works beautifully. I had them reversed and I knew mine
solution wouldn't cover all scenarios.

On 4/26/13 11:43 AM, "Tim Taplin" <[hidden email]> wrote:

>So, for display of all events that intersect with "this week":
>
>eventDate <= last day of week
>and endDate >= first day of week
>
>similar for month.
>
>I'm running that thru my head and it seems that it should match for you.
>
>Tim Taplin
>
>On Apr 26, 2013, at 10:48 AM, "French, Shelane" <[hidden email]> wrote:
>
>> I have an events apps. We have recently added an end date so events can
>> span multiple days. We don't have "repeating" events otherwise, just
>> spanning.
>>
>> Anyways, previously with just one date, I had these parameters like:
>> events=today, events=thisweek, events=thismonth
>> Then I would take those parameters to build my inline (a standard
>>inline).
>>
>> For today I came up with this:
>> $params->merge(array(-lte, 'eventDate'=$thisDate));
>> $params->merge(array(-gte, 'endDate'=$thisDate));
>>
>>
>>
>>
>> That works to pull up an event that is today as well as an event that
>> began 4/15 and ends 5/31.
>>
>> I'm having a hard time coming up with the "this week" and "this month"
>> params. I do already have a way to determine the first and last day of
>>the
>> week as well as first and last of the month. It's just getting those
>> events that span this.
>>
>>
>> #############################################################
>>
>> Attend the Lasso Developer Conference 2013!
>> Sept 12-14, 2013 in Niagara Falls, Canada
>> http://www.lassosoft.com/LDC-niagara-falls-2013
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>  the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
>#############################################################
>
>Attend the Lasso Developer Conference 2013!
>Sept 12-14, 2013 in Niagara Falls, Canada
>http://www.lassosoft.com/LDC-niagara-falls-2013
>
>#############################################################
>This message is sent to you because you are subscribed to
>  the mailing list Lasso
>[hidden email]
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>


#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>