php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38330 Checkdate reports false on good dates
Submitted: 2006-08-04 14:07 UTC Modified: 2006-08-08 11:56 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: thomasvk at gmail dot com Assigned: derick (profile)
Status: Not a bug Package: Date/time related
PHP Version: 5.1.4 OS: Windows XP SP2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
31 - 27 = ?
Subscribe to this entry?

 
 [2006-08-04 14:07 UTC] thomasvk at gmail dot com
Description:
------------
checkdate() returns false on two correct dates, which are 29 February 4905 and 30 February 8228, according to the following source (warning: Dutch!): http://home.wanadoo.nl/~haj.quast/pages/schrikkeljaar.htm

I shall translate/quote the paragraph concerning these dates:

Correction in the future

According to calculations the next correction is due in the year 4905. In this year there will be an extera leapday so it will be 29 February two years in row. A next correction shall be due in the year 8228. That year is already a leapyear in itself so there will be a 30 February.

I hope there's a dev who understands Dutch to confirm this.

Reproduce code:
---------------
$x = checkdate(2, 29, 4905)
$y = checkdate(2, 30, 8228)

Expected result:
----------------
$x = checkdate(2, 29, 4905) // $x should be true
$y = checkdate(2, 30, 8228) // $y should be true

Actual result:
--------------
$x and $y should both become true.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-04 14:13 UTC] tony2001@php.net
Derick, do we support THAT far future? =)
 [2006-08-04 14:14 UTC] thomasvk at gmail dot com
Really sorry for the spam, I thought I was editing, not adding a new comment.

I hope it's clear it should return true, not false.
 [2006-08-08 11:17 UTC] derick@php.net
Luckily for you I can read dutch as well ;-) However, the phrase "Volgens berekeningen zou de..." means "According to the calculations *should*..." which does not mean that it is going to happen in the first place. As there is no official document to back this Dutch page up we can not consider this as a bug and we won't change it right now. Maybe in the (far) future.
 [2006-08-08 11:56 UTC] thomasvk at gmail dot com
True that, you're totally right. The 'zou...moeten' (should) plays a big part in this little piece of text and I totally oversaw that. My apologies for this bugreport.

Kind regards,
Thomas
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 20:01:29 2024 UTC