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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: beagle at emaila dot com
New email:
PHP Version: OS:

 

 [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 03:01:29 2024 UTC