Skip to content

Commit fc59f08

Browse files
Added orthodox Easter header
1 parent 4f6b8ce commit fc59f08

72 files changed

Lines changed: 299 additions & 66 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

VokabelTrainer/Forms/VokabelTrainer.cs

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ public VokabelTrainer()
277277
GetEasterEnd(dtmTestedDay).ToString(strDateFormat) + " Easter");
278278
}
279279

280+
if (dtmTestedDay >= GetOrthodoxEasterStart(dtmTestedDay) && dtmTestedDay < GetOrthodoxEasterEnd(dtmTestedDay))
281+
{
282+
astrEventsThatDay.Add(GetOrthodoxEasterStart(dtmTestedDay).ToString(strDateFormat) + ".." +
283+
GetOrthodoxEasterEnd(dtmTestedDay).ToString(strDateFormat) + " Orthodox Easter");
284+
}
285+
280286
// Christmas
281287
if (dtmTestedDay >= GetChristmasStart(dtmTestedDay) && dtmTestedDay < GetChristmasEnd(dtmTestedDay))
282288
{
@@ -522,6 +528,15 @@ public VokabelTrainer()
522528
SearchEngineRouter.GetSearchUrl(Resources.CelebrationEaster)));
523529
}
524530

531+
532+
if (dtmNow >= GetOrthodoxEasterStart() && dtmNow < GetOrthodoxEasterEnd())
533+
{
534+
oEvents.Add((
535+
strStartPath + "OrthodoxEasterHeader.jpg",
536+
Resources.CelebrationOrthodoxEaster,
537+
SearchEngineRouter.GetSearchUrl(Resources.CelebrationOrthodoxEaster)));
538+
}
539+
525540
// Christmas
526541
if (dtmNow >= GetChristmasStart() && dtmNow < GetChristmasEnd())
527542
{
@@ -4291,6 +4306,71 @@ static DateTime GetEasterEnd(
42914306
return GetEasterSunday(dtmTestedDate).AddDays(+2);
42924307
}
42934308

4309+
//===================================================================================================
4310+
/// <summary>
4311+
/// Calculates the orthodox easter sunday
4312+
/// </summary>
4313+
/// <param name="dtmTestedDate">The date for identification of the year</param>
4314+
/// <returns>The date of orthodox easter sunday in Gregorian calendar</returns>
4315+
//===================================================================================================
4316+
static DateTime GetOrthodoxEasterSunday(
4317+
DateTime dtmTestedDate
4318+
)
4319+
{
4320+
int nYear = dtmTestedDate.Year;
4321+
int a = nYear % 19;
4322+
int b = nYear % 4;
4323+
int c = nYear % 7;
4324+
4325+
int d = (19 * a + 15) % 30;
4326+
int e = (2 * b + 4 * c + 6 * d + 6) % 7;
4327+
4328+
int f = d + e;
4329+
4330+
// Julian Easter
4331+
int nDay, nMonth;
4332+
if (f <= 9)
4333+
{
4334+
nDay = 22 + f;
4335+
nMonth = 3; // March
4336+
}
4337+
else
4338+
{
4339+
nDay = f - 9;
4340+
nMonth = 4; // April
4341+
}
4342+
4343+
// julian date to gregorian (20th/21st century: +13 Tage)
4344+
return new DateTime(nYear, nMonth, nDay,
4345+
new System.Globalization.JulianCalendar());
4346+
}
4347+
4348+
//===================================================================================================
4349+
/// <summary>
4350+
/// Calculates the day of eastern for current year
4351+
/// </summary>
4352+
/// <returns>The day of eastern sunday</returns>
4353+
//===================================================================================================
4354+
static DateTime GetOrthodoxEasterStart(
4355+
DateTime? dtmTestedDate = null
4356+
)
4357+
{
4358+
return GetOrthodoxEasterSunday(dtmTestedDate ?? DateTime.Now).AddDays(-3);
4359+
}
4360+
4361+
4362+
//===================================================================================================
4363+
/// <summary>
4364+
/// Calculates the day of eastern for current year
4365+
/// </summary>
4366+
/// <returns>The day of eastern sunday</returns>
4367+
//===================================================================================================
4368+
static DateTime GetOrthodoxEasterEnd(
4369+
DateTime? dtmTestedDate = null
4370+
)
4371+
{
4372+
return GetOrthodoxEasterSunday(dtmTestedDate ?? DateTime.Now).AddDays(+2);
4373+
}
42944374

42954375

42964376
//===================================================================================================
106 KB
Loading

VokabelTrainer/Properties/Resources.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

VokabelTrainer/Properties/Resources.af.resx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@
144144
<data name="CelebrationEaster" xml:space="preserve">
145145
<value>Christene regoor die wêreld vier Paasfees</value>
146146
</data>
147-
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
148147
<data name="CelebrationEsc" xml:space="preserve">
149148
<value>Musiekfees in Europa</value>
150149
</data>
@@ -163,6 +162,9 @@
163162
<data name="CelebrationOrthodoxChristmas" xml:space="preserve">
164163
<value>Ortodokse Christene vier Kersfees</value>
165164
</data>
165+
<data name="CelebrationOrthodoxEaster" xml:space="preserve">
166+
<value>Ortodokse Christene vier Paasfees</value>
167+
</data>
166168
<data name="CelebrationOscar" xml:space="preserve">
167169
<value>Oscar: Film Akademie-toekennings</value>
168170
</data>

VokabelTrainer/Properties/Resources.am-ET.resx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@
144144
<data name="CelebrationEaster" xml:space="preserve">
145145
<value>በመላው አለም ያሉ ክርስቲያኖች የትንሳኤ በዓልን እያከበሩ ነው።</value>
146146
</data>
147-
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
148147
<data name="CelebrationEsc" xml:space="preserve">
149148
<value>በአውሮፓ የሙዚቃ ፌስቲቫል</value>
150149
</data>
@@ -163,6 +162,9 @@
163162
<data name="CelebrationOrthodoxChristmas" xml:space="preserve">
164163
<value>የኦርቶዶክስ ክርስቲያኖች ገናን እያከበሩ ነው።</value>
165164
</data>
165+
<data name="CelebrationOrthodoxEaster" xml:space="preserve">
166+
<value>የኦርቶዶክስ ክርስቲያኖች የትንሳኤ በዓልን እያከበሩ ነው።</value>
167+
</data>
166168
<data name="CelebrationOscar" xml:space="preserve">
167169
<value>ኦስካር፡ የፊልም አካዳሚ ሽልማቶች</value>
168170
</data>

VokabelTrainer/Properties/Resources.ar.resx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@
144144
<data name="CelebrationEaster" xml:space="preserve">
145145
<value>يحتفل المسيحيون حول العالم بعيد الفصح</value>
146146
</data>
147-
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
148147
<data name="CelebrationEsc" xml:space="preserve">
149148
<value>مهرجان موسيقي في أوروبا</value>
150149
</data>
@@ -163,6 +162,9 @@
163162
<data name="CelebrationOrthodoxChristmas" xml:space="preserve">
164163
<value>المسيحيون الأرثوذكس يحتفلون بعيد الميلاد</value>
165164
</data>
165+
<data name="CelebrationOrthodoxEaster" xml:space="preserve">
166+
<value>يحتفل المسيحيون الأرثوذكس بعيد الفصح</value>
167+
</data>
166168
<data name="CelebrationOscar" xml:space="preserve">
167169
<value>الأوسكار: جوائز أكاديمية السينما</value>
168170
</data>

VokabelTrainer/Properties/Resources.az.resx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@
144144
<data name="CelebrationEaster" xml:space="preserve">
145145
<value>Bütün dünyada xristianlar Pasxa bayramını qeyd edirlər</value>
146146
</data>
147-
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
148147
<data name="CelebrationEsc" xml:space="preserve">
149148
<value>Avropada musiqi festivalı</value>
150149
</data>
@@ -163,6 +162,9 @@
163162
<data name="CelebrationOrthodoxChristmas" xml:space="preserve">
164163
<value>Pravoslav xristianlar Milad bayramını qeyd edirlər</value>
165164
</data>
165+
<data name="CelebrationOrthodoxEaster" xml:space="preserve">
166+
<value>Pravoslav xristianlar Pasxa bayramını qeyd edirlər</value>
167+
</data>
166168
<data name="CelebrationOscar" xml:space="preserve">
167169
<value>Oskar: Film Akademiyası mükafatları</value>
168170
</data>

VokabelTrainer/Properties/Resources.be.resx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@
144144
<data name="CelebrationEaster" xml:space="preserve">
145145
<value>Хрысціяне ва ўсім свеце святкуюць Вялікдзень</value>
146146
</data>
147-
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
148147
<data name="CelebrationEsc" xml:space="preserve">
149148
<value>Музычны фестываль у Еўропе</value>
150149
</data>
@@ -163,6 +162,9 @@
163162
<data name="CelebrationOrthodoxChristmas" xml:space="preserve">
164163
<value>Праваслаўныя хрысціяне святкуюць Каляды</value>
165164
</data>
165+
<data name="CelebrationOrthodoxEaster" xml:space="preserve">
166+
<value>Праваслаўныя хрысціяне святкуюць Вялікдзень</value>
167+
</data>
166168
<data name="CelebrationOscar" xml:space="preserve">
167169
<value>Оскар: прэмія Кінаакадэміі</value>
168170
</data>

VokabelTrainer/Properties/Resources.bg.resx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@
144144
<data name="CelebrationEaster" xml:space="preserve">
145145
<value>Християни по целия свят празнуват Великден</value>
146146
</data>
147-
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
148147
<data name="CelebrationEsc" xml:space="preserve">
149148
<value>Музикален фестивал в Европа</value>
150149
</data>
@@ -163,6 +162,9 @@
163162
<data name="CelebrationOrthodoxChristmas" xml:space="preserve">
164163
<value>Православните християни празнуват Коледа</value>
165164
</data>
165+
<data name="CelebrationOrthodoxEaster" xml:space="preserve">
166+
<value>Православните християни празнуват Великден</value>
167+
</data>
166168
<data name="CelebrationOscar" xml:space="preserve">
167169
<value>Оскар: Награди на Филмовата академия</value>
168170
</data>

VokabelTrainer/Properties/Resources.bo-CN.resx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@
144144
<data name="CelebrationEaster" xml:space="preserve">
145145
<value>འཛམ་གླིང་ཡོངས་ཀྱི་ཡེ་ཤུའི་ཆོས་ལུགས་པ་ཚོས་ཨིསི་ཊར་དུས་ཆེན་སྲུང་བརྩི་ཞུ་བཞིན་ཡོད།</value>
146146
</data>
147-
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
148147
<data name="CelebrationEsc" xml:space="preserve">
149148
<value>ཡུ་རོབ་ནང་གི་རོལ་དབྱངས་དུས་སྟོན།</value>
150149
</data>
@@ -163,6 +162,9 @@
163162
<data name="CelebrationOrthodoxChristmas" xml:space="preserve">
164163
<value>ཡེ་ཤུའི་འཁྲུངས་སྐར་སྲུང་བརྩི་ཞུ་བཞིན་ཡོད།</value>
165164
</data>
165+
<data name="CelebrationOrthodoxEaster" xml:space="preserve">
166+
<value>ཡེ་ཤུའི་ཆོས་ལུགས་པ་ཚོས་ཨིསི་ཊར་དུས་ཆེན་སྲུང་བརྩི་ཞུ་བཞིན་ཡོད།</value>
167+
</data>
166168
<data name="CelebrationOscar" xml:space="preserve">
167169
<value>ཨོ་སི་ཀར།གློག་བརྙན་སློབ་གླིང་གི་བྱ་དགའ།</value>
168170
</data>

0 commit comments

Comments
 (0)