RunRyder RC
WATCH
 1 page 432 views POST REPLY
HomeOff Topics › Javascript programmers
03-31-2009 02:10 AM  9 years agoPost 1
Steeltoes

rrApprentice

Mankato MN

My Posts: All  Forum  Topic

Can someone give me suggestions on how to dynamically change a calender on our webpage each month to reflect the new meeting date and time?

I'd appreciate any help I am having a brain fart!

AMA #913061

PM  EMAIL  HOMEPAGE  GALLERY  Attn:RR  Quote
03-31-2009 01:29 PM  9 years agoPost 2
jelkins

rrApprentice

Oklahoma City, OK - USA

My Posts: All  Forum  Topic

What is the rule for the meeting? First monday of the month so on?

PM  EMAIL  HOMEPAGE  GALLERY  Attn:RR  Quote
03-31-2009 02:25 PM  9 years agoPost 3
Steeltoes

rrApprentice

Mankato MN

My Posts: All  Forum  Topic

Rule would be the first Tuesday of the month at 7:00 PM

AMA #913061

PM  EMAIL  HOMEPAGE  GALLERY  Attn:RR  Quote
03-31-2009 03:57 PM  9 years agoPost 4
jelkins

rrApprentice

Oklahoma City, OK - USA

My Posts: All  Forum  Topic

Ok, there of course is a million and one ways to do it but here is quick and easy one I came up with. This one should automaticaly roll over to the next month when the current months first tuesday passes.

var iday = 1;
var firstDay = new Date((new Date()).getFullYear(), (new Date()).getMonth(), iday);
var weekDay = firstDay.getDay();
var newDay = null;

while (weekDay != 2) {
iday++;
newDay = new Date((new Date()).getFullYear(), (new Date()).getMonth(), iday);
weekDay = newDay.getDay();
if (iday > 10) break;
}

if (newDay < (new Date())) {
iday = 1;
firstDay = new Date((new Date()).getFullYear(), (new Date()).getMonth()+1, iday);
weekDay = firstDay.getDay();

while (weekDay != 2) {
iday++;
newDay = new Date((new Date()).getFullYear(), (new Date()).getMonth()+1, iday);
weekDay = newDay.getDay();
if (iday > 10) break;
}
}

alert("date: " + (newDay.getMonth()+1) + "/" + newDay.getDate() + "/" + newDay.getFullYear() + " 7:00PM" );

PM  EMAIL  HOMEPAGE  GALLERY  Attn:RR  Quote
03-31-2009 04:11 PM  9 years agoPost 5
Steeltoes

rrApprentice

Mankato MN

My Posts: All  Forum  Topic

Thankyou very much. I'll try it later this evening.

AMA #913061

PM  EMAIL  HOMEPAGE  GALLERY  Attn:RR  Quote
WATCH
 1 page 432 views POST REPLY
HomeOff Topics › Javascript programmers
 Print TOPIC  Make Suggestion 

 0  Topic Subscribe

Friday, November 16 - 8:16 am - Copyright © 2000-2018 RunRyder   EMAILEnable Cookies

The RC discussion world needs to consolidate. RR is now one choice for that. Its software is cutting edge. It hosts on-topic advertising. Help RR increase traffic buy making suggestions, posting in RR's new areas (sites) and by spreading the word.

The RunRyder Difference

• Category system to allow Rep/Vendor postings.
• Classifieds with sold (hidden) category.
• Classifieds with separate view new.
• Answer PMs offsite via email reply.
• Member gallery photos with advanced scripting.
• Gallery photo viewer integrated into postings.
• Highly refined search with advanced back end.
• Hosts its own high end fast response servers.
• Hosts thousands of HD event coverage videos.
• Rewrote entire code base with latest technology.
• No off-topic (annoying) click bait advertising.
Login Here
 New Subscriptions 
 Buddies Online