|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-01-24 23:41 UTC] ceo at l-i-e dot com
It would be Really Nifty (tm) if the date function had a letter that meant: number of weeks or partial weeks in a month Then, a monthly-calendar system would know how many rows you'll need... PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 15:00:02 2025 UTC |
It almost has. With a bit of date-match you can calculate that like this: $date = new DateTime('2017-02-01'); echo ceil(($date->format('t') + 6 - $date->format('w')) /7); As it's something that can be done easily in userland there's no need to add further complexity to the sources,