Adding and subtracting dates and times in PHP

Views: 2.826
Reading Time: 3 minutes

Good night!

This post is intended for you PHP programmers who are having trouble adding and subtracting dates and times in PHP. I have prepared a small class to help them overcome this problem. Come on:

To work with date manipulation, once again, it's very simple:

Let's play with time manipulation now:

And finally, we will use the function of adding business days. Unlike the addDays function, it only adds business days to the date:

See you!