-24 :20-01-2038
-23 :20-02-2038
-22 :20-03-2038
-21 :20-04-2038
-20 :20-05-2038
-19 :20-06-2038
-18 :20-07-2038
-17 :20-08-2038
-16 :20-09-2038
-15 :20-10-2038
-14 :20-11-2038
-13 :20-12-2038
-12 :20-01-2039
-11 :20-02-2039
-10 :20-03-2039
-9 :20-04-2039
-8 :20-05-2039
-7 :20-06-2039
-6 :20-07-2039
-5 :20-08-2039
-4 :20-09-2039
-3 :20-10-2039
-2 :20-11-2039
-1 :20-12-2039
0 :20-01-2040
1 :20-02-2040
2 :20-03-2040
3 :20-04-2040
4 :20-05-2040
5 :20-06-2040
6 :20-07-2040
7 :20-08-2040
8 :20-09-2040
9 :20-10-2040
10 :20-11-2040
11 :20-12-2040
12 :20-01-2041
13 :20-02-2041
14 :20-03-2041
15 :20-04-2041
16 :20-05-2041
17 :20-06-2041
18 :20-07-2041
19 :20-08-2041
20 :20-09-2041
21 :20-10-2041
22 :20-11-2041
23 :20-12-2041
24 :20-01-2042

Testing adodb_date and adodb_mktime. version=0.35 PHP=7.3.33

adodb: 2025-01-23 00:26:19
php : 2025-01-23 00:26:19

Testing gregorian <=> julian conversion

-12219382800 -12219296400 15 Oct 1582, Fri=Fri
4 Oct 1582, Thu=Thu

Testing overflow

Testing 2-digit => 4-digit year conversion

Err 2-digit 1940
Err 2-digit 1950

Testing date formating

4:05:54 am AM 10 Sat April 4 4 04 04 05 10 Saturday 0 04 Apr 4 +0200 RFC2822 Sat, 10 Apr 1982 04:05:54 +0200 54 30 387252354 6 82 1982 99 7200 2003 Error date(): 387252354
 
  "date CEST 1982-04-10 04:05:54 am AM 10 Sat April 4 4 04 04 05 10 Saturday 0 04 Apr 4 +0200 RFC2822 Sat, 10 Apr 1982 04:05:54 +0200 54 30 387252354 6 82 1982 99 7200 2003" (date len=169)
  "date CEST 1982-04-10 03:05:54 am AM 10 Sat April 3 3 03 03 05 10 Saturday 0 04 Apr 4 +0100 RFC2822 Sat, 10 Apr 1982 03:05:54 +0100 54 30 387252354 6 82 1982 99 3600 2003" (adodb_date len=169)

8:33:21 pm PM 08 Mon June 6 18 06 18 33 8 Monday 0 06 Jun 6 +0200 RFC2822 Mon, 08 Jun 1981 18:33:21 +0200 21 30 360866001 1 81 1981 158 7200 2003 Error date(): 360866001
 
  "date CEST 1981-06-08 18:33:21 pm PM 08 Mon June 6 18 06 18 33 8 Monday 0 06 Jun 6 +0200 RFC2822 Mon, 08 Jun 1981 18:33:21 +0200 21 30 360866001 1 81 1981 158 7200 2003" (date len=167)
  "date CEST 1981-06-08 17:33:21 pm PM 08 Mon June 5 17 05 17 33 8 Monday 0 06 Jun 6 +0100 RFC2822 Mon, 08 Jun 1981 17:33:21 +0100 21 30 360866001 1 81 1981 158 3600 2003" (adodb_date len=167)

Error getdate() 360866001
Array ( [seconds] => 21 [minutes] => 33 [hours] => 18 [mday] => 8 [wday] => 1 [mon] => 6 [year] => 1981 [yday] => 158 [weekday] => Monday [month] => June [0] => 360866001 )
Array ( [seconds] => 21 [minutes] => 33 [hours] => 17 [mday] => 8 [wday] => 1 [mon] => 6 [year] => 1981 [yday] => 158 [weekday] => Monday [month] => June [0] => 360866001 )

5:45:19 am AM 17 Wed September 5 5 05 05 45 17 Wednesday 1 09 Sep 9 +0200 RFC2822 Wed, 17 Sep 1980 05:45:19 +0200 19 30 338010319 3 80 1980 260 7200 2003 Error date(): 338010319

 
  "date CEST 1980-09-17 05:45:19 am AM 17 Wed September 5 5 05 05 45 17 Wednesday 1 09 Sep 9 +0200 RFC2822 Wed, 17 Sep 1980 05:45:19 +0200 19 30 338010319 3 80 1980 260 7200 2003" (date len=175)
  "date CEST 1980-09-17 04:45:19 am AM 17 Wed September 4 4 04 04 45 17 Wednesday 1 09 Sep 9 +0100 RFC2822 Wed, 17 Sep 1980 04:45:19 +0100 19 30 338010319 3 80 1980 260 3600 2003" (adodb_date len=175)

Error getdate() 338010319
Array ( [seconds] => 19 [minutes] => 45 [hours] => 5 [mday] => 17 [wday] => 3 [mon] => 9 [year] => 1980 [yday] => 260 [weekday] => Wednesday [month] => September [0] => 338010319 )
Array ( [seconds] => 19 [minutes] => 45 [hours] => 4 [mday] => 17 [wday] => 3 [mon] => 9 [year] => 1980 [yday] => 260 [weekday] => Wednesday [month] => September [0] => 338010319 )

6:22:31 am AM 04 Sat July 6 6 06 06 22 4 Saturday 0 07 Jul 7 +0200 RFC2822 Sat, 04 Jul 1981 06:22:31 +0200 31 31 363068551 6 81 1981 184 7200 2003 Error date(): 363068551

 
  "date CEST 1981-07-04 06:22:31 am AM 04 Sat July 6 6 06 06 22 4 Saturday 0 07 Jul 7 +0200 RFC2822 Sat, 04 Jul 1981 06:22:31 +0200 31 31 363068551 6 81 1981 184 7200 2003" (date len=168)
  "date CEST 1981-07-04 05:22:31 am AM 04 Sat July 5 5 05 05 22 4 Saturday 0 07 Jul 7 +0100 RFC2822 Sat, 04 Jul 1981 05:22:31 +0100 31 31 363068551 6 81 1981 184 3600 2003" (adodb_date len=168)

10:37:26 am AM 12 Sat July 10 10 10 10 37 12 Saturday 1 07 Jul 7 +0200 RFC2822 Sat, 12 Jul 1980 10:37:26 +0200 26 31 332239046 6 80 1980 193 7200 2003 Error date(): 332239046
 
  "date CEST 1980-07-12 10:37:26 am AM 12 Sat July 10 10 10 10 37 12 Saturday 1 07 Jul 7 +0200 RFC2822 Sat, 12 Jul 1980 10:37:26 +0200 26 31 332239046 6 80 1980 193 7200 2003" (date len=171)
  "date CEST 1980-07-12 09:37:26 am AM 12 Sat July 9 9 09 09 37 12 Saturday 1 07 Jul 7 +0100 RFC2822 Sat, 12 Jul 1980 09:37:26 +0100 26 31 332239046 6 80 1980 193 3600 2003" (adodb_date len=169)

Error getdate() 332239046
Array ( [seconds] => 26 [minutes] => 37 [hours] => 10 [mday] => 12 [wday] => 6 [mon] => 7 [year] => 1980 [yday] => 193 [weekday] => Saturday [month] => July [0] => 332239046 )
Array ( [seconds] => 26 [minutes] => 37 [hours] => 9 [mday] => 12 [wday] => 6 [mon] => 7 [year] => 1980 [yday] => 193 [weekday] => Saturday [month] => July [0] => 332239046 )

1:02:30 am AM 30 Tue June 1 1 01 01 02 30 Tuesday 0 06 Jun 6 +0200 RFC2822 Tue, 30 Jun 1981 01:02:30 +0200 30 30 362703750 2 81 1981 180 7200 2003 Error date(): 362703750

 
  "date CEST 1981-06-30 01:02:30 am AM 30 Tue June 1 1 01 01 02 30 Tuesday 0 06 Jun 6 +0200 RFC2822 Tue, 30 Jun 1981 01:02:30 +0200 30 30 362703750 2 81 1981 180 7200 2003" (date len=168)
  "date CEST 1981-06-30 00:02:30 am AM 30 Tue June 12 0 12 00 02 30 Tuesday 0 06 Jun 6 +0100 RFC2822 Tue, 30 Jun 1981 00:02:30 +0100 30 30 362703750 2 81 1981 180 3600 2003" (adodb_date len=169)

Error getdate() 362703750
Array ( [seconds] => 30 [minutes] => 2 [hours] => 1 [mday] => 30 [wday] => 2 [mon] => 6 [year] => 1981 [yday] => 180 [weekday] => Tuesday [month] => June [0] => 362703750 )
Array ( [seconds] => 30 [minutes] => 2 [hours] => 0 [mday] => 30 [wday] => 2 [mon] => 6 [year] => 1981 [yday] => 180 [weekday] => Tuesday [month] => June [0] => 362703750 )

Testing random dates between 100 and 4000

Testing 1961 to 1973, or 378432000 seconds, offset=91969: 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 Tested 4115 dates

Failed :-(

Original: 2063-12-24
Converted: 24-Dec-2063