Edit report at http://bugs.php.net/bug.php?id=15184&edit=1
ID: 15184 Comment by: fernandojmartin at gmail dot com Reported by: j-f at gmx dot net Summary: Calculate the quarter with date('Q')? Status: Wont fix Type: Feature/Change Request Package: Feature/Change Request Operating System: - PHP Version: 4.1.1 Assigned To: derick Block user comment: N Private report: N New Comment: Why not to just follow the way MySQL behaves? In that way I'm not obligated to calculate part of the date OUTSIDE the DB server! The YEAR starts on Jan 1st. Period. The first week of the year has nothing to do with Q1 if the real date is December 31. I don't see a clear sustenance in derick's explanation. Previous Comments: ------------------------------------------------------------------------ [2005-08-12 08:46:49] der...@php.net Some people have different opinions on when the quarter starts. Just saying that it starts at january 1 is in correct, as most people start Q1 in the first week of the year or something. That's why I don't think we should add this. ------------------------------------------------------------------------ [2005-08-11 19:22:39] nlop...@php.net One more for you, Derick :) ------------------------------------------------------------------------ [2002-01-23 11:44:26] j-f at gmx dot net I added a note how to calculate the quarter: ceil(date('n')/3); But I suggest extending date() with the option 'Q' or 'q'. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=15184&edit=1