I'm looking for a JavaScript library that can calculate recurring appointments. Something that can handle things like "every 2nd Wednesday". The solution needs to be JavaScript and client side only. I don't need a calendar, just something that can do the date recurring appointment calculations. Any suggestions?
A:
You can probably use the answers of this question: http://stackoverflow.com/questions/2028061/how-to-check-calculate-the-week-day-count-using-date-functions-using-javascript/
Alsciende
2010-03-05 13:30:01
A:
There is a JavaScript implementation of strtotime()
over on phpjs.org. It seems to be able to do calculations like
strtotime('+1 week 2 days 4 hours 2 seconds', 1129633200);
based on UNIX timestamps.
You could find the first wednesday using strtotime("next wednesday")
(If that's implemented), and then count on using strtotime("+2 weeks");
.
I 'm not sure what to think about phpjs in general and I haven't worked with it, but maybe that function cuts it for you.
Pekka
2010-03-05 15:07:47