Next: , Previous: Ranges of days, Up: Further date part attributes


5.1.3.3 Repetition factor of days

A repetition factor of days is used to define recurrent fixed dates and to use only one line in the resource file for them, instead of using several lines in a resource file needed for defining these recurrent fixed dates separately.

A repetition factor of days (‘:n’) is specified by a ‘:’ character and must trail the day field —which must have a concrete value in a date part of a Gcal resource file and has not been set to a zero value— respectively either lead or trail an appearance factor of days. Except ranges of days or fixed dates which occur only on a definite weekday like ‘199600mon Every Monday 1996’, such a repetition factor may be specified in all possible codings of date parts of a Gcal resource file.

This factor may have values in range 1...999. Values greater than the real difference between the date of the first occurrence of the fixed date and the last day of the year are always reduced to this real difference. In this sense, any value greater 3651 means a repetition factor until the last day of the year.

Assuming a fixed date shall always occur on the 15th day in every month of the year 1996 and covers a period of four days (inclusive the 15th itself), e.g. ‘Co-workers training’, one solution would be on the one hand a fixed date entry in the resource file for the 15th of the month and the succeeding three days, which would be a total of four entries in the resource file for such a fixed date2.

On the other hand, this expense can be reduced to a total of only one entry in the resource file by using a repetition factor of days, which is likewise valid for the 15th and the three days which succeed the 15th in every month, namely

     19960015:4 Co-workers training

The use of repetition factors of days in the date part is permitted as follows:

Some examples to this:

000001fr3:11
In every year in January: every day that appears within the period of the 3rd Friday of the month and the succeeding ten days.
00000112:3
In every year in January: every day that appears within the period of the 12th of the month and the succeeding two days.
00000112:3,fr3:5
In every year in January: every day that appears within the period of the 12th of the month and the succeeding two days, and that appears within the period of the 3rd Friday of the month and the succeeding four days.
0*d1:1
In every year: every day that appears within the period of the 1st day of the year and no succeeding day.
0*d1:2
In every year: every day that appears within the period of the 1st day of the year and the succeeding day.
0*d99fr:333
In every year: every day that appears within the period of the last Friday of the year and the succeeding 332 days. Well, in cases a fixed date exceeds the year bounds, it will only be produced until the last day of the year.
1996*w1fr:17
In the year 1996: every day that appears within the period of the Friday of the 1st week and the succeeding 16 days.
0@a:4
In every year: every day that appears within the period of the date of the date variable a and the succeeding three days.
1996@e-3:9
In the year 1996: every day that appears within the period of the date three days before the Easter Sunday's date and the succeeding eight days.
1996@t-3:9
In the year 1996: every day that appears within the period of the date three days before today's date and the succeeding eight days.

Footnotes

[1] Or 366 in leap years.

[2] Apart from the possibility, that a list or a range of days can be used in such a case.