summaryrefslogtreecommitdiff
path: root/etc/nationaldays/README
blob: 6a1cbb5367bea6b29f14497450366a604825bb19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Entry files for the nationalholiday plugin

The format is simple. It is a standard xml file. So all tags must closed. A
handy tool for checking closed tags is the xmllint utility provided by
libxml2.

Each xml file is enclosed by:
<nationaldays>
...
</nationaldays>

Each <nationaldays> tag should be follwed by a short description tag:
<description value="german holidays"/>

The description will probably be used later on. Follow the description with
the <entries> enclosure:
<entries>
...
</entries>

Insert your holidays in either fixed or floating format.  A fixed holiday entry
has the form:
<entry name="description of holiday" date="M-D" />

A floating holiday entry has the form:
<entry name="<name>" type="floating">
  <calculation>
     ... calc entries ..
  </calculation>
</entry>

The calc entries may have the following tags:
date - A short date (without Year!) in the form M-D or the special string
       "easter"
offset - A signed integer. This will added (or substracted) after all other
         calculations are made.
weekday - The day of week as in "monday', "tuesday", "wednesday", "thursday",
          "friday", "saturday" or "sunday".
dayofmonth - Used in combination with weekday tag. You can use "first",
             "second", "third", "fourth" or "last".
month - Used in combination with weekday and/or dayofmonth eg. "january",
        "february" and so on.
datedep - Used in combination with date and/or weekday, may "before" or "after".

example calculation entry:
<calculation>
   <weekday value="sunday"/>
   <datedep value="before"/>
   <date value="12-24"/>
</calculation>

this will calculate sunday before christmas eve or christmas eve itself if it is a sunday.

see german.xml or any of the .xml files in this directory for futher examples.