PHP | date_isodate_set() Function Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The date_isodate_set() function is an inbuilt function in PHP which is used to sets the ISO (International Organization for Standardization ) date. This function set the date according to the ISO 8601 standard, using weeks and day offsets rather than specific dates. Syntax: Procedural style: date_isodate_set ( $object, $year, $week, $day ) Object oriented style: DateTime::setISODate ( $year, $week, $day ) Parameters: This function accepts four parameters as mentioned above and described below: $object: This parameter is used in procedural style only. This parameter is created by date_create() function. The function modifies this object. $year: This parameter is used to set year of the date. $week:This parameter set the Week of the date. $day: This parameter set offset from the first day of week. Return Value: This function returns the DateTime object for method chaining on success or False on failure. Below programs illustrate the date_isodate_set() function in PHP: Program 1: php <?php $date = date_create(); date_isodate_set($date, 2018, 9); echo date_format($date, 'Y-m-d') . "\n"; date_isodate_set($date, 2018, 8, 17); echo date_format($date, 'Y-m-d') . "\n"; date_isodate_set($date, 2018, 12, 23); echo date_format($date, 'Y-m-d') . "\n"; date_isodate_set($date, 2015, 8, 24); echo date_format($date, 'Y-m-d'); ?> Output: 2018-02-26 2018-03-07 2018-04-10 2015-03-11 Program 2: php <?php $date = new DateTime(); $date->setISODate(12, 05, 2018); echo $date->format('d-m-Y') . "\n"; $date->setISODate(2018, 2, 27); echo $date->format('Y-m-d') . "\n"; ?> Output: 08-08-0017 2018-02-03 Related Articles: PHP | date_parse() Function PHP | date_sunset() Function PHP | date_sun_info() Function Reference: https://www.php.net/manual/en/datetime.setisodate.php Create Quiz Comment V vijay_raj Follow 0 Improve V vijay_raj Follow 0 Improve Article Tags : Misc Web Technologies PHP Explore BasicsPHP Syntax4 min readPHP Variables5 min readPHP | Functions6 min readPHP Loops4 min readArrayPHP Arrays5 min readPHP Associative Arrays4 min readMultidimensional arrays in PHP5 min readSorting Arrays in PHP4 min readOOPs & InterfacesPHP Classes2 min readPHP | Constructors and Destructors5 min readPHP Access Modifiers4 min readMultiple Inheritance in PHP4 min readMySQL DatabasePHP | MySQL Database Introduction4 min readPHP Database connection2 min readPHP | MySQL ( Creating Database )3 min readPHP | MySQL ( Creating Table )3 min readPHP AdvancePHP Superglobals6 min readPHP | Regular Expressions12 min readPHP Form Handling4 min readPHP File Handling4 min readPHP | Uploading File3 min readPHP Cookies9 min readPHP | Sessions7 min read Like