This example shows how a Java Script calculates the actual dates of a regular meeting group :

Group AABBCC

The group AABBCC meets every second tuesday in the month from 19-20 a clock

Group XXYYZZ

The group XXYYZZ meets two-weekly every second monday from 20-22 a clock




© elmue@gmx.de



I'm taking care of a web page, which contains dates of a group meeting every second tuesday of the month and another group meeting every 2 mondays independent of the month. I wrote the script because some day I was sick of updating the page every few weeks and looking up the next dates in the calendar.

This script is a little bit tricky because it calculates 14 days further by adding 14 to the date no matter if the resulting date exists. For example 25 April +14 = 39 April but the browser calulates the correct date from it. It works fine on Internet Explorer and Netscape. Also the change to the next year is performed correctly.

If the next meeting date is today, it is only shown, if the momentary time is before the meeting time. For example : Now it is 16 a clock and the group meets at 20 a clock, the date of today is enumerated. But if it is now 22 o clock and the group meets at 20 a clock, the next meeting date is shown.


INDICE