[PHP-BUG] Req #65696 [NEW]: Bug Calendar year 2016 with mktime()

2013-09-18 Thread philippe dot alcaina at hotmail dot fr
From: philippe dot alcaina at hotmail dot fr
Operating system: 
PHP version:  5.5.3
Package:  *Calendar problems
Bug Type: Feature/Change Request
Bug description:Bug Calendar year 2016 with mktime()

Description:

I'm a french developer computer.
For an internet tool I need to get a list of weeks after having selected
one year and one month.
By testing I found a BUG in the year 2016.
PHP gives me:
1 January 2016 the number of week: 53 (instead of 1)
January 31, 2016 the number of week: 4 (instead of 5)
then the error shifts in other months.
The system works correctly in 2013, 2014, 2015.



Test script:
---
I provide you sample of the code that allows me to build this list of
weeks, I particularly use mktime ()

// timestamp of first day of month
$time = mktime(0,0,0,$mois_select,1,$annee_select);
// number of days of month
$nbrJoursMois = intval(date('t',$time));
// the number of the first week
$numSemaineDebutMois = intval(date('W', $time));
// timestamp of end month
$timeFinMois = mktime(0,0,0,$mois_select,$nbrJoursMois,$annee_select);
// the number of the last week
$numSemaineFinMois = intval(date('W', $timeFinMois));

/ Display results /
$annee_select = 2016
$mois_select = 1
$time = 1451602800
$nbrJoursMois = 31
$numSemaineDebutMois = 53  (Error)
$timeFinMois = 1454194800
$numSemaineFinMoisnum = 4   (Error)


-- 
Edit bug report at https://bugs.php.net/bug.php?id=65696&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=65696&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=65696&r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=65696&r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=65696&r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=65696&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65696&r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=65696&r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=65696&r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=65696&r=support
Expected behavior:  https://bugs.php.net/fix.php?id=65696&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=65696&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=65696&r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=65696&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65696&r=php4
Daylight Savings:   https://bugs.php.net/fix.php?id=65696&r=dst
IIS Stability:  https://bugs.php.net/fix.php?id=65696&r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=65696&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65696&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65696&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65696&r=mysqlcfg



[PHP-BUG] Req #65695 [NEW]: mktime() with year 2016

2013-09-18 Thread philippe dot alcaina at hotmail dot fr
From: philippe dot alcaina at hotmail dot fr
Operating system: 
PHP version:  5.5.3
Package:  *Calendar problems
Bug Type: Feature/Change Request
Bug description:mktime() with year 2016

Description:

I'm a french developer computer.
For an internet tool I need to get a list of weeks after having selected
one year and one month.
By testing I found a BUG in the year 2016.
PHP gives me:
1 January 2016 the number of week: 53 (instead of 1)
January 31, 2016 the number of week: 4 (instead of 5)
then the error shifts in other months.
The system works correctly in 2013, 2014, 2015.

I provide you sample of the code that allows me to build this list of
weeks, I particularly use mktime ()

// timestamp of first day of month
$time = mktime(0,0,0,$mois_select,1,$annee_select);
// number of days of month
$nbrJoursMois = intval(date('t',$time));
// the number of the first week
$numSemaineDebutMois = intval(date('W', $time));
// timestamp of end month
$timeFinMois = mktime(0,0,0,$mois_select,$nbrJoursMois,$annee_select);
// the number of the last week
$numSemaineFinMois = intval(date('W', $timeFinMois));

/ Display results /
$annee_select = 2016
$mois_select = 1
$time = 1451602800
$nbrJoursMois = 31
$numSemaineDebutMois = 53  (Error)
$timeFinMois = 1454194800
$numSemaineFinMoisnum = 4   (Error)


-- 
Edit bug report at https://bugs.php.net/bug.php?id=65695&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=65695&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=65695&r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=65695&r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=65695&r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=65695&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65695&r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=65695&r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=65695&r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=65695&r=support
Expected behavior:  https://bugs.php.net/fix.php?id=65695&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=65695&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=65695&r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=65695&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65695&r=php4
Daylight Savings:   https://bugs.php.net/fix.php?id=65695&r=dst
IIS Stability:  https://bugs.php.net/fix.php?id=65695&r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=65695&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65695&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65695&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65695&r=mysqlcfg



[PHP-BUG] Req #65694 [NEW]: error calendar in year 2016, with function mktime()

2013-09-18 Thread philippe dot alcaina at hotmail dot fr
From: philippe dot alcaina at hotmail dot fr
Operating system: windows linux
PHP version:  5.5.3
Package:  Date/time related
Bug Type: Feature/Change Request
Bug description:error calendar in year 2016, with function mktime() 

Description:

I'm a french developer computer.

For an internet tool I need to get a list of weeks after having selected
one year and one month.

By testing I found a BUG in the year 2016.

PHP gives me:
1 January 2016 the number of week: 53 (instead of 1)
January 31, 2016 the number of week: 4 (instead of 5)

then the error shifts in other months.

The system works correctly in 2013, 2014, 2015.




Test script:
---
I provide you sample of the code that allows me to build this list of
weeks, I particularly use mktime ()


// timestamp of first day of month
$time = mktime(0,0,0,$mois_select,1,$annee_select);
// number of days of month
$nbrJoursMois = intval(date('t',$time));
// the number of the first week
$numSemaineDebutMois = intval(date('W', $time));
// timestamp of end month
$timeFinMois = mktime(0,0,0,$mois_select,$nbrJoursMois,$annee_select);
// the number of the last week
$numSemaineFinMois = intval(date('W', $timeFinMois));

/ Display results /

$annee_select = 2016
$mois_select = 1
$time = 1451602800
$nbrJoursMois = 31
$numSemaineDebutMois = 53  (Error)
$timeFinMois = 1454194800
$numSemaineFinMoisnum = 4   (Error)






-- 
Edit bug report at https://bugs.php.net/bug.php?id=65694&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=65694&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=65694&r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=65694&r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=65694&r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=65694&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65694&r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=65694&r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=65694&r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=65694&r=support
Expected behavior:  https://bugs.php.net/fix.php?id=65694&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=65694&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=65694&r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=65694&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65694&r=php4
Daylight Savings:   https://bugs.php.net/fix.php?id=65694&r=dst
IIS Stability:  https://bugs.php.net/fix.php?id=65694&r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=65694&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65694&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65694&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65694&r=mysqlcfg