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
 [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-2021 The PHP Group
All rights reserved.
Last updated: Fri Feb 26 19:01:24 2021 UTC