Week Calculation in PHP

Working with Dates is always a problem. PHP just has a limited ability to work properly with dates, some things are not so easy too find. The PEAR Library offers a good amound of possibilities to work with dates, but the price is a massive loss of speed.

After searching a while I found 3 useful functions to work with weeks. Which I adapted to my needs.

Everything should be clear otherwise you may ask in the comments.