summaryrefslogtreecommitdiff
path: root/etc
authormickeyl <mickeyl>2005-05-06 21:11:54 (UTC)
committer mickeyl <mickeyl>2005-05-06 21:11:54 (UTC)
commit4e47752ffb1083ca4426d9c08ae1c1ceb100acdb (patch) (unidiff)
tree0057cce6102ce078d52e7d2e41ef99839a9e32cb /etc
parente8bb0ef7701e6bb565dc178424687e82b12bd8ec (diff)
downloadopie-4e47752ffb1083ca4426d9c08ae1c1ceb100acdb.zip
opie-4e47752ffb1083ca4426d9c08ae1c1ceb100acdb.tar.gz
opie-4e47752ffb1083ca4426d9c08ae1c1ceb100acdb.tar.bz2
add US holidays to nationaldays and improve README. patch courtesy Erik Hovland (erik@hovland.org) - thanks
Diffstat (limited to 'etc') (more/less context) (ignore whitespace changes)
-rw-r--r--etc/nationaldays/README58
-rw-r--r--etc/nationaldays/us-ca.xml35
-rw-r--r--etc/nationaldays/us-common.xml92
-rw-r--r--etc/nationaldays/us.xml49
4 files changed, 208 insertions, 26 deletions
diff --git a/etc/nationaldays/README b/etc/nationaldays/README
index 71af75b..6a1cbb5 100644
--- a/etc/nationaldays/README
+++ b/etc/nationaldays/README
@@ -1,48 +1,54 @@
1Config files for the nationalholiday plugin 1Entry files for the nationalholiday plugin
2 2
3Format is simple: 3The format is simple. It is a standard xml file. So all tags must closed. A
4Standard-xml file. 4handy tool for checking closed tags is the xmllint utility provided by
5It must always enclosed by 5libxml2.
6
7Each xml file is enclosed by:
6<nationaldays> 8<nationaldays>
7... 9...
8</nationaldays> 10</nationaldays>
9 11
10then a short description tag. 12Each <nationaldays> tag should be follwed by a short description tag:
11<description value="german holidays"/> 13<description value="german holidays"/>
12 14
13for example. It should be used later on. 15The description will probably be used later on. Follow the description with
14 16the <entries> enclosure:
15then a list of holidays follows, encapsulated with
16<entries> 17<entries>
17... 18...
18</entries> 19</entries>
19 20
20A non-floating holiday entry has the form 21Insert your holidays in either fixed or floating format. A fixed holiday entry
21<entry date="M-D" name="description of holiday"/> 22has the form:
23<entry name="description of holiday" date="M-D" />
22 24
23floating holidays: 25A floating holiday entry has the form:
24<entry name="<name>" type="floating"> 26<entry name="<name>" type="floating">
25<calculation> 27 <calculation>
26 ... calc entries .. 28 ... calc entries ..
27</calculation> 29 </calculation>
28</entry> 30</entry>
29 31
30The calcentries may following tags: 32The calc entries may have the following tags:
31 33date - A short date (without Year!) in the form M-D or the special string
32date - a short date (without Year!) in form M-D or the string "easter" 34 "easter"
33offset - integer. these days will added (or substracted) after all other calcs are made. 35offset - A signed integer. This will added (or substracted) after all other
34weekday - the day of week as monday, tuesday and so on. 36 calculations are made.
35dayofmoth - in combination with weekday you can say "first <weekday> of ..." or "second <weekday> of ..." 37weekday - The day of week as in "monday', "tuesday", "wednesday", "thursday",
36month - monthname(!) eg. january, february and so on. 38 "friday", "saturday" or "sunday".
37datedep - dependy to "date", may "before" or "after". 39dayofmonth - Used in combination with weekday tag. You can use "first",
38 40 "second", "third", "fourth" or "last".
39example: 41month - Used in combination with weekday and/or dayofmonth eg. "january",
42 "february" and so on.
43datedep - Used in combination with date and/or weekday, may "before" or "after".
44
45example calculation entry:
40<calculation> 46<calculation>
41 <weekday value="sunday"/> 47 <weekday value="sunday"/>
42 <datedep value="before"/> 48 <datedep value="before"/>
43 <date value="12-24"/> 49 <date value="12-24"/>
44</calculation> 50</calculation>
45 51
46these will calculate sunday before christmaseve or christmas eve itself if it is a sunday. 52this will calculate sunday before christmas eve or christmas eve itself if it is a sunday.
47 53
48see german.xml for futher examples. 54see german.xml or any of the .xml files in this directory for futher examples.
diff --git a/etc/nationaldays/us-ca.xml b/etc/nationaldays/us-ca.xml
new file mode 100644
index 0000000..bfdec4a
--- a/dev/null
+++ b/etc/nationaldays/us-ca.xml
@@ -0,0 +1,35 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<nationaldays>
3<description value="Californian Holidays"/>
4<entries>
5<entry name="Martin Luther King, Jr.'s Birthday Observed" type="floating">
6 <calculation>
7 <weekday value="monday"/>
8 <datedep value="after"/>
9 <date value="01-15"/>
10 </calculation>
11</entry>
12<entry name="Cesar Chavez's Birthday" date="03-31"/>
13<entry name="Daylight Savings (spring forward)" type="floating">
14 <calculation>
15 <dayofmonth value="first"/>
16 <weekday value="sunday"/>
17 <month value="april"/>
18 </calculation>
19</entry>
20<entry name="Columbus Day" type="floating">
21 <calculation>
22 <dayofmonth value="second"/>
23 <weekday value="monday"/>
24 <month value="october"/>
25 </calculation>
26</entry>
27<entry name="Daylight Savings (fall back)" type="floating">
28 <calculation>
29 <dayofmonth value="last"/>
30 <weekday value="sunday"/>
31 <month value="october"/>
32 </calculation>
33</entry>
34</entries>
35</nationaldays>
diff --git a/etc/nationaldays/us-common.xml b/etc/nationaldays/us-common.xml
new file mode 100644
index 0000000..70aaa58
--- a/dev/null
+++ b/etc/nationaldays/us-common.xml
@@ -0,0 +1,92 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<nationaldays>
3<description value="US Commonly Celebrated Holidays"/>
4<entries>
5<entry name="Groundhog Day" date="02-02"/>
6<entry name="Valentine's Day" date="02-14"/>
7<entry name="St. Patrick's Day" date="03-17"/>
8<entry name="April Fool's Day" date="04-01"/>
9<entry name="Earth Day" date="04-22"/>
10<entry name="Bring Your Children to Work Day" type="floating">
11 <calculation>
12 <dayofmonth value="fourth"/>
13 <weekday value="thursday"/>
14 <month value="april"/>
15 </calculation>
16</entry>
17<entry name="Secretaries' Day" type="floating">
18 <calculation>
19 <dayofmonth value="last"/>
20 <weekday value="saturday"/>
21 <month value="april"/>
22 <offset value="-3"/>
23 </calculation>
24</entry>
25<entry name="Arbor Day" type="floating">
26 <calculation>
27 <dayofmonth value="last"/>
28 <weekday value="friday"/>
29 <month value="april"/>
30 </calculation>
31</entry>
32<entry name="May Day" date="05-01"/>
33<entry name="Cinco de Mayo" date="05-05"/>
34<entry name="National Teacher's Day" type="floating">
35 <calculation>
36 <dayofmonth value="first"/>
37 <weekday value="tuesday"/>
38 <month value="may"/>
39 </calculation>
40</entry>
41<entry name="Mother's Day" type="floating">
42 <calculation>
43 <dayofmonth value="second"/>
44 <weekday value="sunday"/>
45 <month value="may"/>
46 </calculation>
47</entry>
48<entry name="Emancipation Day" date="06-20"/>
49<entry name="Summer Solstice" date="06-21"/>
50<entry name="Father's Day" type="floating">
51 <calculation>
52 <dayofmonth value="third"/>
53 <weekday value="sunday"/>
54 <month value="june"/>
55 </calculation>
56</entry>
57<entry name="Gay Pride Day" type="floating">
58 <calculation>
59 <dayofmonth value="last"/>
60 <weekday value="sunday"/>
61 <month value="june"/>
62 </calculation>
63</entry>
64<entry name="Grandparent's Day" type="floating">
65 <calculation>
66 <dayofmonth value="first"/>
67 <weekday value="monday"/>
68 <month value="september"/>
69 <offset value="+6"/>
70 </calculation>
71</entry>
72<entry name="Patriot Day" date="09-11"/>
73<entry name="Fall Equinox" date="09-23"/>
74<entry name="National Children's Day" date="10-12"/>
75<entry name="Bosses Day" date="10-16"/>
76<entry name="Mother-in-Law's Day" date="10-23"/>
77<entry name="Halloween" date="10-31"/>
78<entry name="Election Day" type="floating">
79 <calculation>
80 <dayofmonth value="first"/>
81 <weekday value="monday"/>
82 <month value="november"/>
83 <offset value="+1"/>
84 </calculation>
85</entry>
86<entry name="Pearl Harbor Day" date="12-07"/>
87<entry name="Human Rights Day" date="12-10"/>
88<entry name="Forefathers' Day" date="12-21"/>
89<entry name="Winter Solstice" date="12-21"/>
90<entry name="New Year's Eve" date="12-31"/>
91</entries>
92</nationaldays>
diff --git a/etc/nationaldays/us.xml b/etc/nationaldays/us.xml
new file mode 100644
index 0000000..fc75b86
--- a/dev/null
+++ b/etc/nationaldays/us.xml
@@ -0,0 +1,49 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<nationaldays>
3<description value="US Holidays"/>
4<entries>
5<entry name="New Year's Day" date="01-01"/>
6<entry name="Martin Luther King, Jr.'s Birthday" date="01-15"/>
7<entry name="President's Day" type="floating">
8 <calculation>
9 <dayofmonth value="third"/>
10 <weekday value="monday"/>
11 <month value="february"/>
12 </calculation>
13</entry>
14<entry name="Memorial Day" type="floating">
15 <calculation>
16 <dayofmonth value="last"/>
17 <weekday value="monday"/>
18 <month value="may"/>
19 </calculation>
20</entry>
21<entry name="Flag Day" date="06-14"/>
22<entry name="Independence Day" date="07-04"/>
23<entry name="Labor Day" type="floating">
24 <calculation>
25 <dayofmonth value="first"/>
26 <weekday value="monday"/>
27 <month value="september"/>
28 </calculation>
29</entry>
30<entry name="Veteran's Day" date="11-11"/>
31<entry name="Thanksgiving" type="floating">
32 <calculation>
33 <dayofmonth value="last"/>
34 <weekday value="thursday"/>
35 <month value="november"/>
36 </calculation>
37</entry>
38<entry name="Day after Thanksgiving" type="floating">
39 <calculation>
40 <dayofmonth value="last"/>
41 <weekday value="thursday"/>
42 <month value="november"/>
43 <offset value="+1"/>
44 </calculation>
45</entry>
46<entry name="Christmas Eve" date="12-24"/>
47<entry name="Christmas Day" date="12-25"/>
48</entries>
49</nationaldays>