php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13975 Date_Calc::weekOfYear() function problem
Submitted: 2001-11-07 07:42 UTC Modified: 2001-12-27 07:38 UTC
From: beagle at emaila dot com Assigned:
Status: Closed Package: PEAR related
PHP Version: 4.0.6 OS: Linux RedHat 7.0
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:
27 + 16 = ?
Subscribe to this entry?

 
 [2001-11-07 07:42 UTC] beagle at emaila dot com
<?
require "Date/Calc.php";

echo Date_Calc::weekOfYear(4,1,1998) . ", ";
echo Date_Calc::weekOfYear(4,1,2004);
?>

and then output is...

1, 0

Why these values are different?

    January 1998                January 2004
Su Mo Tu We Th Fr Sa        Su Mo Tu We Th Fr Sa
             1  2  3                     1  2  3
 4  5  6  7  8  9 10         4  5  6  7  8  9 10
11 12 13 14 15 16 17        11 12 13 14 15 16 17
18 19 20 21 22 23 24        18 19 20 21 22 23 24
25 26 27 28 29 30 31        25 26 27 28 29 30 31

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 05:01:29 2024 UTC