xref: /PHP-8.2/ext/calendar/tests/easter_date.phpt (revision 56f90492)
1--TEST--
2easter_date()
3--INI--
4date.timezone=UTC
5--ENV--
6TZ=UTC
7--EXTENSIONS--
8calendar
9--FILE--
10<?php
11putenv('TZ=UTC');
12echo date("Y-m-d", easter_date(2000))."\n";
13echo date("Y-m-d", easter_date(2001))."\n";
14echo date("Y-m-d", easter_date(2002))."\n";
15try {
16    easter_date(1492);
17} catch (ValueError $ex) {
18    echo "{$ex->getMessage()}\n";
19}
20?>
21--EXPECT--
222000-04-23
232001-04-15
242002-03-31
25easter_date(): Argument #1 ($year) must be between 1970 and 2037 (inclusive)
26