CalendarXP.net Support Forum Index CalendarXP.net Support
Most forums here are private and invisible to public.
 
 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can I give agenda a range of dates?

 
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> FlatCalendarXP Related
View previous topic :: View next topic  
Author Message
nickand



Joined: 13 Mar 2005
Posts: 8

PostPosted: Sat Apr 23, 2005 9:07 am    Post subject: Can I give agenda a range of dates? Reply with quote

Hi,

I have a php agenda file which works great with the holiday function. But is there a simple function either in java or php that I can provide it with a range of dates to show as one holiday?

For example 5th June - 12th August? At the moment I have 3 if statements for each month.
Back to top
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Sat Apr 23, 2005 4:08 pm    Post subject: Reply with quote

Well, you may use the following code to translate php date range into a holiday:
Code:
function fHoliday(y,m,d) {
  ...
  var startDate=new Date(y, <?= phpVarStartMonth ?>-1, <?= phpVarStartDate ?>);
  var endDate=new Date(y, <?= phpVarEndMonth ?>-1, <?= phpVarEndDate ?>);
  var curDate=new Date(y, m-1, d);
  if (startDate<=curDate&&curDate<=endDate)
    return ["my holiday", null];
  ...
}

The phpVarXXX variables are defined in your php page.

_________________
Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved.
Back to top
View user's profile Send private message
nickand



Joined: 13 Mar 2005
Posts: 8

PostPosted: Sat Apr 23, 2005 6:04 pm    Post subject: Reply with quote

Hey Thanks. That works great. I just had to add $ to the beginning of my variables. Thanks for the quick reply.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> FlatCalendarXP Related All times are GMT
Page 1 of 1

 
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


Copyright 2003- Idemfactor Solutions, Inc. All rights reserved.
Powered by phpBB © 2001, 2005 phpBB Group