Looking for script to compare date ranges for a calendar

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Looking for script to compare date ranges for a calendar
harknell
CZ Newbie
harknell has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Sep 19, 2005
0.00 posts per day
Posts: 18
Points: 653
   
Hello everyone, I need to find a function or script that will help me work out an addition to the module Nucalendar (or Events Calendar as it's also called: downloaded from [ Register or login to view links on this board. ]
What I need to do is create a way to determine if an event is already scheduled during a certain time range. I changed one of the paramaters of the Nucalendar scheduling function to limit the location to one of 4 possibilities instead of it's current open ended structure. Now I want to create a way of looking in the database to see if there is already an event scheduled at a certain time in one of these 4 locations (using the variable $location) in the database, and if so tell the user that they can't schedule a new event during this time.

The issue is there are two things going on, the time it starts and the duration it extends. Then I need to check the new event for the same 2 things to make sure there isn't any overlap. The 2 time frames are in these formats: 13:30:00 for the time, and 2005-11-23 for the one time date of an event.

I unbderstand the logic of how to write it, but I'm not quite good enough to know how to compare there dates for greater than, less than, and such in a fashion that will determine what I need. If we were talking regular old numbers it would be easy, but I'm not sure how to convert these guys into that way of doing things. This HAS to have been done for some previous Calendar PHP function, or some other program.

If anyone can point me to a resource on how to do this type of time/date comparrison I would appreciate it greatly.



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum