@@ -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 //===================================================================================================
0 commit comments