DateTime::setISODate

PHP 5 >= 5.2.0, PHP 7, PHP 8
DateTime::setISODate - Sets the ISO date
Manual
Code Examples

Example #1 DateTime::setISODate example

Result: 2008-01-07 2008-01-13
PHP Version:

Example #2 Values exceeding ranges are added to their parent values

Result: 2008-01-13 2008-01-14 2009-01-04
PHP Version:

Example #3 Finding the month a week is in

Result: 3
PHP Version:


Function DateTime::setISODate:

Date and Time Functions

Most used PHP functions