calendarium-romanum 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/config/locales/cs.yml +37 -1
  3. data/config/locales/en.yml +37 -1
  4. data/config/locales/it.yml +36 -2
  5. data/config/locales/la.yml +35 -1
  6. data/data/README.md +62 -4
  7. data/data/czech-brno-cs.txt +10 -2
  8. data/data/czech-budejovice-cs.txt +10 -2
  9. data/data/czech-cechy-cs.txt +9 -2
  10. data/data/czech-cs.txt +7 -1
  11. data/data/czech-hradec-cs.txt +10 -2
  12. data/data/czech-litomerice-cs.txt +10 -2
  13. data/data/czech-morava-cs.txt +9 -2
  14. data/data/czech-olomouc-cs.txt +10 -2
  15. data/data/czech-ostrava-cs.txt +10 -2
  16. data/data/czech-plzen-cs.txt +10 -2
  17. data/data/czech-praha-cs.txt +10 -2
  18. data/data/universal-en.txt +4 -1
  19. data/data/universal-it.txt +4 -1
  20. data/data/universal-la.txt +4 -1
  21. data/lib/calendarium-romanum.rb +3 -0
  22. data/lib/calendarium-romanum/calendar.rb +13 -6
  23. data/lib/calendarium-romanum/data.rb +1 -1
  24. data/lib/calendarium-romanum/day.rb +0 -3
  25. data/lib/calendarium-romanum/enums.rb +41 -21
  26. data/lib/calendarium-romanum/ordinalizer.rb +37 -0
  27. data/lib/calendarium-romanum/sanctoraleloader.rb +13 -2
  28. data/lib/calendarium-romanum/temporale.rb +145 -232
  29. data/lib/calendarium-romanum/temporale/dates.rb +151 -0
  30. data/lib/calendarium-romanum/temporale/extensions/christ_eternal_priest.rb +25 -0
  31. data/lib/calendarium-romanum/transfers.rb +23 -5
  32. data/lib/calendarium-romanum/version.rb +1 -1
  33. data/spec/calendar_spec.rb +72 -19
  34. data/spec/dates_spec.rb +45 -0
  35. data/spec/rank_spec.rb +2 -2
  36. data/spec/readme_spec.rb +11 -9
  37. data/spec/spec_helper.rb +16 -1
  38. data/spec/temporale_spec.rb +252 -126
  39. metadata +19 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9480b0f651cac34e75c9b46bcf5d1be6cd6cd82
4
- data.tar.gz: 6bc42d50fd376ab9ad14a75e9396f9b84a87c6a5
3
+ metadata.gz: 3f03289cd9ccaa431cf73253540580d536eeee2a
4
+ data.tar.gz: 42b4c38cf3f8269573bf609d147299027223c59a
5
5
  SHA512:
6
- metadata.gz: 273cfd23765b4c7c36b41350cf0fa6330b97cd7e40ca5b8d07698afa6ae10577e1a87724e481473d5bd50a13235217183c5d53df7afb01d357046d6cb6182775
7
- data.tar.gz: f3d83d90c16d03a210d006385cf30472cb981b8c3bdf5b466f2492085357d82efb47ef560625a34f2e5ab63f72eb775ba6ee71fda182d5d3ec57c66df2dc8782
6
+ metadata.gz: 10a1d987dbcab6e3cf9685acc491e216212872b66a4f5438621503f1883b49060cb1812582dbe258dc570aedb1890c5d7e9c5b9f36f0db7208de2518431bde4d
7
+ data.tar.gz: 67441557436e16191e974bc2c666231b7676d8f159f7b5ba761d2e83a1f54ae538f6d1e152a30255fa7c37bc907af670996c60395e139c151d691cf82921f0f9
@@ -16,7 +16,35 @@ cs:
16
16
  holy_trinity: Nejsvětější Trojice
17
17
  body_blood: Těla a krve Páně
18
18
  sacred_heart: Nejsvětějšího srdce Ježíšova
19
+ immaculate_heart: Neposkvrněného Srdce Panny Marie
19
20
  christ_king: Ježíše Krista krále
21
+ extension:
22
+ christ_eternal_priest: Ježíše Krista, nejvyššího a věčného kněze
23
+ ordinary:
24
+ sunday: '%{week} neděle v mezidobí'
25
+ ferial: '%{weekday} %{week} týdne v mezidobí'
26
+ advent:
27
+ sunday: '%{week} neděle adventní'
28
+ ferial: '%{weekday} po %{week} neděli adventní'
29
+ christmas:
30
+ nativity_octave:
31
+ ferial: '%{day} den v oktávu Narození Páně'
32
+ sunday: '%{week} neděle po Narození Páně'
33
+ ferial: '%{weekday} po oktávu Narození Páně'
34
+ after_epiphany:
35
+ ferial: '%{weekday} po Zjevení Páně'
36
+ lent:
37
+ after_ashes:
38
+ ferial: '%{weekday} po Popeleční středě'
39
+ sunday: '%{week} neděle postní'
40
+ ferial: '%{weekday} po %{week} neděli postní'
41
+ holy_week:
42
+ ferial: '%{weekday} Svatého týdne'
43
+ easter:
44
+ octave:
45
+ ferial: '%{weekday} v oktávu velikonočním'
46
+ sunday: '%{week} neděle velikonoční'
47
+ ferial: '%{weekday} po %{week} neděli velikonoční'
20
48
  rank:
21
49
  '1_1': Velikonoční triduum
22
50
  '1_2': Primární liturgické dny
@@ -37,4 +65,12 @@ cs:
37
65
  sunday: neděle
38
66
  memorial: památka
39
67
  memorial_opt: nezávazná památka
40
- ferial: ferie
68
+ ferial: ferie
69
+ weekday:
70
+ '0': Neděle
71
+ '1': Pondělí
72
+ '2': Úterý
73
+ '3': Středa
74
+ '4': Čtvrtek
75
+ '5': Pátek
76
+ '6': Sobota
@@ -16,7 +16,33 @@ en:
16
16
  holy_trinity: The Most Holy Trinity
17
17
  body_blood: The Most Holy Body and Blood of Christ
18
18
  sacred_heart: The Most Sacred Heart of Jesus
19
+ immaculate_heart: Immaculate Heart of Mary
19
20
  christ_king: Our Lord Jesus Christ, King of the Universe
21
+ ordinary:
22
+ sunday: '%{week} Sunday in Ordinary Time'
23
+ ferial: '%{weekday}, %{week} week in Ordinary Time'
24
+ advent:
25
+ sunday: '%{week} Sunday of Advent'
26
+ ferial: '%{weekday}, %{week} week of Advent'
27
+ christmas:
28
+ nativity_octave:
29
+ ferial: '%{day} day of Christmas Octave'
30
+ sunday: '%{week} Sunday after the Nativity of the Lord'
31
+ ferial: '%{weekday} after Christmas Octave'
32
+ after_epiphany:
33
+ ferial: '%{weekday} after Epiphany'
34
+ lent:
35
+ after_ashes:
36
+ ferial: '%{weekday} after Ash Wednesday'
37
+ sunday: '%{week} Sunday of Lent'
38
+ ferial: '%{weekday}, %{week} week of Lent'
39
+ holy_week:
40
+ ferial: '%{weekday} of Holy Week'
41
+ easter:
42
+ octave:
43
+ ferial: 'Easter %{weekday}'
44
+ sunday: '%{week} Sunday of Easter'
45
+ ferial: '%{weekday}, %{week} week of Easter'
20
46
  rank:
21
47
  '1_1': Easter triduum
22
48
  '1_2': Primary liturgical days
@@ -31,10 +57,20 @@ en:
31
57
  '3_11': Proper obligatory memorials
32
58
  '3_12': Optional memorials
33
59
  '3_13': Ferials
60
+ '4_0': Commemorations
34
61
  short:
35
62
  solemnity: solemnity
36
63
  feast: feast
37
64
  sunday: Sunday
38
65
  memorial: memorial
39
66
  memorial_opt: optional memorial
40
- ferial: ferial
67
+ ferial: ferial
68
+ commemoration: commemoration
69
+ weekday:
70
+ '0': Sunday
71
+ '1': Monday
72
+ '2': Tuesday
73
+ '3': Wednesday
74
+ '4': Thursday
75
+ '5': Friday
76
+ '6': Saturday
@@ -6,7 +6,7 @@ it:
6
6
  mother_of_god: Ottava di Natale. Maria Santissima Madre di Dio
7
7
  epiphany: Epifania del Signore
8
8
  baptism_of_lord: Battesimo del Signore
9
- ash_wednesday:
9
+ ash_wednesday: Mercoledì delle ceneri
10
10
  palm_sunday: Domenica delle palme
11
11
  good_friday: Venerdì santo
12
12
  holy_saturday: Sabato santo
@@ -16,7 +16,33 @@ it:
16
16
  holy_trinity: Santissima Trinità
17
17
  body_blood: Santissimo Corpo e Sangue di Cristo
18
18
  sacred_heart: Sacro Cuore di Gesù
19
+ immaculate_heart: Cuore Immacolato di Maria
19
20
  christ_king: "Nostro Signore Gesù Cristo Re dell'universo"
21
+ ordinary:
22
+ sunday: '%{week} Domenica del Tempo Ordinario'
23
+ ferial: '%{weekday} della %{week} settimana del Tempo Ordinario'
24
+ advent:
25
+ sunday: '%{week} Domenica Avvento'
26
+ ferial: '%{weekday}, %{week} Avvento'
27
+ christmas:
28
+ nativity_octave:
29
+ ferial: '%{day}, Ottava di Natale'
30
+ sunday: 'Domenica %{week}, Tempo di Natale'
31
+ ferial: '%{weekday}, Tempo di Natale'
32
+ after_epiphany:
33
+ ferial: '%{weekday} dopo la Epifania del Signore'
34
+ lent:
35
+ after_ashes:
36
+ ferial: '%{weekday} dopo le Ceneri'
37
+ sunday: 'Domenica %{week} di Quaresima'
38
+ ferial: '%{weekday}, %{week} di Quaresima'
39
+ holy_week:
40
+ ferial: '%{weekday}, Settimana Santa'
41
+ easter:
42
+ octave:
43
+ ferial: '%{weekday}, Ottava di Pasqua'
44
+ sunday: 'Domenica %{week} di Pasqua'
45
+ ferial: '%{weekday}, %{week} di Pasqua'
20
46
  rank:
21
47
  '1_1': Easter triduum
22
48
  '1_2': Primary liturgical days
@@ -37,4 +63,12 @@ it:
37
63
  sunday: domenica
38
64
  memorial: memoria
39
65
  memorial_opt: memoria facoltative
40
- ferial: feria
66
+ ferial: feria
67
+ weekday:
68
+ '0': Domenica
69
+ '1': Lunedì
70
+ '2': Martedì
71
+ '3': Mercoledì
72
+ '4': Giovedì
73
+ '5': Venerdì
74
+ '6': Sabato
@@ -16,7 +16,33 @@ la:
16
16
  holy_trinity: Sanctissimae Trinitatis
17
17
  body_blood: Sanctissimi Corporis et Sanguinis Christi
18
18
  sacred_heart: Sacratissimi Cordis Iesu
19
+ immaculate_heart: Immaculati Cordis B. Mariae Virginis
19
20
  christ_king: Domini nostri Iesu Christi universorum regis
21
+ ordinary:
22
+ sunday: 'Dominica %{week} per annum'
23
+ ferial: '%{weekday}, hebdomada %{week} per annum'
24
+ advent:
25
+ sunday: 'Dominica %{week} Adventus'
26
+ ferial: '%{weekday}, hebdomada %{week} Adventus'
27
+ christmas:
28
+ nativity_octave:
29
+ ferial: 'De die %{day} infra octavam Nativitatis'
30
+ sunday: 'Dominica %{week} post Nativitatem'
31
+ ferial: '%{weekday} post octavam Nativitatis'
32
+ after_epiphany:
33
+ ferial: '%{weekday} post Epiphaniam'
34
+ lent:
35
+ after_ashes:
36
+ ferial: '%{weekday} post Cineres'
37
+ sunday: 'Dominica %{week} Quadragesimae'
38
+ ferial: '%{weekday}, hebdomada %{week} Quadragesimae'
39
+ holy_week:
40
+ ferial: '%{weekday} Hebdomadae Sanctae'
41
+ easter:
42
+ octave:
43
+ ferial: '%{weekday} infra octavam Paschae'
44
+ sunday: 'Dominica %{week} Paschae'
45
+ ferial: '%{weekday}, hebdomada %{week} temporis paschalis'
20
46
  rank:
21
47
  '1_1': Triduum paschale
22
48
  '1_2': Dies liturgici primarii
@@ -37,4 +63,12 @@ la:
37
63
  sunday: dominica
38
64
  memorial: memoria
39
65
  memorial_opt: memoria ad libitum
40
- ferial: feria
66
+ ferial: feria
67
+ weekday:
68
+ '0': Dominica
69
+ '1': Feria secunda
70
+ '2': Feria tertia
71
+ '3': Feria quarta
72
+ '4': Feria quinta
73
+ '5': Feria sexta
74
+ '6': Sabbato
@@ -34,10 +34,56 @@ DAY must be a number valid as a possible date in the given month.
34
34
  31 is not valid in April, as there is never April 31st.)
35
35
 
36
36
  RANK is a single letter m=memorial, f=feast, s=solemnity.
37
- If omitted, optional memorial is default.
38
- The letter can be followed by a number, e.g. ```f2.5``` - the number
39
- must be valid celebration rank priority as defined in
37
+ If omitted, optional memorial is assumed.
38
+
39
+ When it is desirable to specify rank of a celebration
40
+ with greater precision, e.g. in order to distinguish feasts
41
+ inscribed in the General Roman Calendar from proper feasts,
42
+ use rank number instead of a rank letter.
43
+ Rank priority numbers are defined in
40
44
  [lib/calendarium-romanum/enums.rb](../lib/calendarium-romanum/enums.rb)
45
+ and correspond to section and subsection numbers in
46
+ the Table of Liturgical Days
47
+ (see end of the [General Norms](https://www.ewtn.com/library/CURIA/CDWLITYR.HTM)).
48
+ This is why the sequence is non-continuous:
49
+ `1.4` is followed by `2.5` and `2.9` by `3.10`.
50
+
51
+ The example below presents pairs of equivalent lines,
52
+ the first one specifying rank by letter, the second one by number.
53
+ Rank letters are always interpreted as if the celebration
54
+ was inscribed in the General Roman Calendar.
55
+
56
+ ```
57
+ 3/19 s : Saint Joseph Husband of the Blessed Virgin Mary
58
+ 3/19 1.3 : Saint Joseph Husband of the Blessed Virgin Mary
59
+
60
+ 1/25 f : The Conversion of Saint Paul, apostle
61
+ 1/25 2.7 : The Conversion of Saint Paul, apostle
62
+
63
+ 1/26 m : Saints Timothy and Titus, bishops
64
+ 1/26 3.10 : Saints Timothy and Titus, bishops
65
+
66
+ 1/27 : Saint Angela Merici, virgin
67
+ 1/27 3.12 : Saint Angela Merici, virgin
68
+ ```
69
+
70
+ As an example of a proper celebration (which requires rank number
71
+ when exact ranking is important) let's use solemnity of the
72
+ principal patron of Bohemia, martyr duke St. Wenceslas:
73
+
74
+ ```
75
+ 9/28 1.4 R : Sv. Václava, mučedníka, hlavního patrona českého národa
76
+ ```
77
+
78
+ When you have dificulties remembering meanings of the numbers,
79
+ but are comfortable with rank letters, it might be helpful for you
80
+ to use rank numbers *alongside* the letters.
81
+ This is supported too, you will find this format used throughout
82
+ the bundled data files.
83
+
84
+ ```
85
+ 9/28 s1.4 R : Sv. Václava, mučedníka, hlavního patrona českého národa
86
+ ```
41
87
 
42
88
  COLOUR is a single letter R=red, W=white (G=green, V=violet normally
43
89
  shouldn't be necessary in a sanctorale calendar, but both are available
@@ -54,7 +100,7 @@ Included is a script controlling correctness of data files
54
100
  and printing detected errors
55
101
 
56
102
  ```
57
- $ ruby bin/calendariumrom.rb errors path/to/my/datafile.txt
103
+ $ calendariumrom errors path/to/my/datafile.txt
58
104
  ```
59
105
 
60
106
  ## How to use the Czech calendars
@@ -85,3 +131,15 @@ The tree of correct combinations looks like this:
85
131
  * `czech-olomouc-cs.txt`
86
132
  * `czech-brno-cs.txt`
87
133
  * `czech-ostrava-cs.txt`
134
+
135
+ `SanctoraleFactory` is a helper class making it really easy
136
+ to build `Sanctorale` from multiple layers:
137
+
138
+ ```ruby
139
+ CR = CalendariumRomanum
140
+ layers = %w(czech-cs czech-cechy-cs czech-praha-cs).collect do |id|
141
+ CR::Data[id].load
142
+ end
143
+
144
+ layered_sanctorale = CR::SanctoraleFactory.create_layered(*layers)
145
+ ```
@@ -1,5 +1,13 @@
1
- # Czech Republic
2
- # diocese of Brno
1
+ ---
2
+ title: kalendář brněnské diecéze
3
+ description: Calendar for diocese of Brno, Czech Republic
4
+ locale: cs
5
+ country: cz
6
+ diocese: Brno
7
+ extends:
8
+ - czech-cs.txt
9
+ - czech-morava-cs.txt
10
+ ---
3
11
 
4
12
  5/21 f2.8 : Výročí posvěcení katedrály sv. Petra a Pavla
5
13
  5/30 m3.11 : Sv. Zdislavy
@@ -1,5 +1,13 @@
1
- # Czech Republic
2
- # diocese of České Budějovice
1
+ ---
2
+ title: kalendář českobudějovické diecéze
3
+ description: Calendar for diocese of České Budějovice, Czech Republic
4
+ locale: cs
5
+ country: cz
6
+ diocese: České Budějovice
7
+ extends:
8
+ - czech-cs.txt
9
+ - czech-cechy-cs.txt
10
+ ---
3
11
 
4
12
  6/19 m3.11 : Sv. Jana Nepomuckého Neumanna, biskupa
5
13
 
@@ -1,5 +1,12 @@
1
- # Czech Republic
2
- # province of Bohemia
1
+ ---
2
+ title: kalendář české církevní provincie
3
+ description: Calendar for province of Bohemia
4
+ locale: cs
5
+ country: cz
6
+ province: Bohemia
7
+ extends:
8
+ - czech-cs.txt
9
+ ---
3
10
 
4
11
  5/30 m3.11 : Sv. Zdislavy
5
12
 
@@ -1,5 +1,11 @@
1
- # Calendar for the dioceses of Czech Republic
1
+ ---
2
+ title: Český národní kalendář
3
+ description: Calendar for the dioceses of Czech Republic
4
+ locale: cs
5
+ country: cz
6
+ temporale_extensions: [ChristEternalPriest]
2
7
  # source: http://cs.wikipedia.org/wiki/%C4%8Cesk%C3%BD_liturgick%C3%BD_kalend%C3%A1%C5%99
8
+ ---
3
9
 
4
10
  = 1
5
11
  2 m : Sv. Basila Velikého a Řehoře Naziánského, biskupů a učitelů církve
@@ -1,5 +1,13 @@
1
- # Czech Republic
2
- # diocese of Hradec Králové
1
+ ---
2
+ title: kalendář královéhradecké diecéze
3
+ description: Calendar for diocese of Hradec Králové, Czech Republic
4
+ locale: cs
5
+ country: cz
6
+ diocese: Hradec Králové
7
+ extends:
8
+ - czech-cs.txt
9
+ - czech-cechy-cs.txt
10
+ ---
3
11
 
4
12
  10/30 f2.8 : Výročí posvěcení katedrály Sv. Ducha
5
13
 
@@ -1,5 +1,13 @@
1
- # Czech Republic
2
- # diocese of Litomerice
1
+ ---
2
+ title: kalendář litoměřické diecéze
3
+ description: Calendar for diocese of Litoměřice, Czech Republic
4
+ locale: cs
5
+ country: cz
6
+ diocese: Litoměřice
7
+ extends:
8
+ - czech-cs.txt
9
+ - czech-cechy-cs.txt
10
+ ---
3
11
 
4
12
  5/30 f2.8 : Sv. Zdislavy, hlavní patronky diecéze
5
13
 
@@ -1,5 +1,12 @@
1
- # Czech Republic
2
- # province of Moravia
1
+ ---
2
+ title: kalendář moravské církevní provincie
3
+ description: Calendar for province of Moravia
4
+ locale: cs
5
+ country: cz
6
+ province: Moravia
7
+ extends:
8
+ - czech-cs.txt
9
+ ---
3
10
 
4
11
  5/6 m3.11 R : Sv. Jana Sarkandra, kněze a mučedníka
5
12
  5/20 m3.11 : Sv. Klementa Marie Hofbauera, kněze
@@ -1,4 +1,12 @@
1
- # Czech Republic
2
- # archdiocese of Olomouc
1
+ ---
2
+ title: kalendář olomoucké arcidiecéze
3
+ description: Calendar for archdiocese of Olomouc, Czech Republic
4
+ locale: cs
5
+ country: cz
6
+ diocese: Olomouc
7
+ extends:
8
+ - czech-cs.txt
9
+ - czech-morava-cs.txt
10
+ ---
3
11
 
4
12
  6/30 f2.8 : Výročí posvěcení katedrály sv. Václava
@@ -1,5 +1,13 @@
1
- # Czech Republic
2
- # diocese of Ostrava and Opava
1
+ ---
2
+ title: kalendář ostravsko-opavské diecéze
3
+ description: Calendar for diocese of Ostrava and Opava, Czech Republic
4
+ locale: cs
5
+ country: cz
6
+ diocese: Ostrava, Opava
7
+ extends:
8
+ - czech-cs.txt
9
+ - czech-morava-cs.txt
10
+ ---
3
11
 
4
12
  7/16 f2.8 : Výročí posvěcení katedrály Božského Spasitele
5
13