easter_day

NAME

easter_day(): Returns DATE of easter day in given DATETIME's year.

TYPE

Function

DESCRIPTION

Compute date for Easter Day on given year.

SYNOPSIS

easter_day(dt DATETIME)
  RETURNS DATE

Input:

  • dt: a DATETIME object, by which computation is made. dt is only checked for its YEAR part. All other information (month, day, time) is irrelevant. Hence, the two inputs '2012-01-01' and '2012-08-27 15:16:17' yield with the same result.

EXAMPLES

mysql> SELECT common_schema.easter_day('2012-01-01') AS easter_day_2012;
+-----------------+
| easter_day_2012 |
+-----------------+
| 2012-04-08      |
+-----------------+

ENVIRONMENT

MySQL 5.1 or newer

AUTHOR

Shlomi Noach, based on contribution by Roland Bouman
 
common_schema documentation