I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
get GPL
COST (GBP)
this unit 3.12
sub units 5.12
+
0
UnitsDate

easter Sunday

Calculates the date of Easter Sunday for the given year. Open Office: EASTERSUNDAY
Controller: CodeCogs

Dependents

Info

Interface

C++
Excel

Overview

This component calculates the date of Easter Sunday for a specified Year. Two functions are presented: The first returns a serial number, equivalent to that which you find in Excel, with represents the date of Easter Sunday. The second converts this value into a human readable form (a string!).

Many other important dates (holidays!) can also be calculated from this function, for example:
  • Septuagesima Sunday = easterSunday(...) -63
  • Sexagesima Sunday = easterSunday(...) -56
  • Shrove Sunday = easterSunday(...) -49
  • Shrove Tuesday = easterSunday(...) -47
  • Ash Wednesday = easterSunday(...) -46
  • Mothers Day (UK only)= easterSunday(...) -21
  • Passion Sunday = easterSunday(...) -14
  • Palm Sunday = easterSunday(...) -7
  • Holy or Maundy Thursday = easterSunday(...) -3
  • Good Friday = easterSunday(...) -2
  • Rogation Sunday = easterSunday(...) +35
  • Ascension Day = easterSunday(...) +39
  • Pentecost or Whitsunday = easterSunday(...) +49
  • Whitmundy = easterSunday(...) +50
  • Trinity Sunday = easterSunday(...) +56
  • Corpus Christi = easterSunday(...) +60 (or easterSunday(...)+63 Catholic Church in the United States)

Example 1

To calculate the date of Good Friday for the next 10 years
#include <stdio.h>
#include <codecogs/units/date/eastersunday.h>
#include <codecogs/units/date/dateymd.h>
using namespace Units::Date;
 
int main()
{
  for(int year=2004; year<=2014; year++)
  {
    int ndate=easterSunday(year) - 2;
    int d,m,y;
    dateYMD(ndate, y, m, d);
    printf("\n In year %d, Good Friday is on %d/%d", y, d, m);
  }
  return 0;
}
Output:
In year 2004, Good Friday is on 9/4
In year 2005, Good Friday is on 25/3
In year 2006, Good Friday is on 14/4
In year 2007, Good Friday is on 6/4
In year 2008, Good Friday is on 21/3
In year 2009, Good Friday is on 10/4
In year 2010, Good Friday is on 2/4
In year 2011, Good Friday is on 22/4
In year 2012, Good Friday is on 6/4
In year 2013, Good Friday is on 29/3
In year 2014, Good Friday is on 18/4

EasterSunday

 
inteasterSundayintyear )[inline]
Calculates the date of Easter Sunday in the specified Year, returning the serial Julian date (see date).

The calculation of the Day and Month for Easter Sunday that falls within the specified Year (for the Gregorian calendar) is performed using the equations:

References:

Tondering, C. 2003. www.tondering.dk/claus/cal/node3.html

Parameters

yearthe year to compute easter for

Returns

the serial Julian date (see date)

Authors

Will Bateman (Oct 2004)
Source Code

Source code is available when you agree to a GP Licence or buy a Commercial Licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.


EasterSunday Str

 
std::stringeasterSunday_strintyear )
Returns the date of Easter in a string format with day followed by month for the year specified.

Example 2

int main(void)
{
  for(int year=2004; year<=2014; year++)
  {
    printf("\n%s",Units::Date::easterSunday_str(year).c_str());
  }
}

Note

References

Parameters

yearthe year to compute easter for

Returns

a string containing the date
Source Code

Source code is available when you agree to a GP Licence or buy a Commercial Licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.