100 dating ee
It replicates the functionality of Open Office's NETWORKDAYS function - you give it a start date, an end date, and an array of any holidays you want skipped, and it'll tell you the number of business days (inclusive of the start and end days! I've tested it pretty strenuously but date arithmetic is complicated and there's always the possibility I missed something, so please feel free to check my math.
The function could certainly be made much more powerful, to allow you to set different days to be ignored (e.g.
Day 1 of next week is Since PHP 5.6.23, this results in: Today is Sun , day 0 of this week.
Day 1 of next week is It's common for us to overthink the complexity of date/time calculations and underthink the power and flexibility of PHP's built-in functions.
For example using a 24 hour notation without leading zeros is the option '%G' in PHP but '%k' in My SQL.
When using dynamically generated date formatting string, be careful to generate the correct options for either PHP or My SQL.
This is very good for SEO especially search engines like Google .
Prior to PHP 5.6.23, Relative Formats for the start of the week aligned with PHP's (0=Sunday,6=Saturday).
Since 5.6.23, Relative Formats for the start of the week align with ISO-8601 (1=Monday,7=Sunday).
Monday-Friday, excluding holidays) between any two given dates.
I couldn't find a simple way to do that in PHP, so I threw this together.