PHP | date_isodate_set() Function Last Updated : 14 Sep, 2018 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: http://php.net/manual/en/datetime.setisodate.php Comment More infoAdvertise with us Next Article PHP | date_isodate_set() Function V vijay_raj Follow Improve Article Tags : Misc Web Technologies PHP Practice Tags : Misc Similar Reads PHP | date_sun_info() Function The date_sun_info() is an inbuilt function in PHP which is used to find the information about sunset/sunrise and twilight begin/end for a specified day and location.Syntax: array date_sun_info($timestamp, $latitude, $longitude) Parameters: This function accepts three parameters as mentioned above an 2 min read PHP | date_sunset() Function The date_sunset() is an inbuilt function in PHP which is used to find the sunset time for a specified day and location. Syntax: date_sunset ( $timestamp, $format, $latitude, $longitude, $zenith, $gmtoffset ) Parameters: This function accepts four parameters as mentioned above and described below. $t 2 min read PHP | date_parse() Function The date_parse() is an inbuilt function in PHP which is used to find the detailed information about a specified date. This function returns an associative array of detailed information for a specified date on success and returns FALSE on failure Syntax: date_parse($date) Parameters Used: The date_pa 2 min read PHP | idate() Function The idate() function is an inbuilt function in PHP which is used to format a local time/date as an integer. The $format and $timestamp are sent as parameters to the idate() function and it returns an integer formatted according to the specified format using the given timestamp. Unlike the function d 2 min read PHP | date_date_set() Function The date_date_set() function is an inbuilt function in PHP which is used to set a new Date. This function has four parameters $object, $year, $month and $day and returns DateTime object on success or false on failure. The date_date_set() function is an alias of DateTime::setDate() function. Syntax: 2 min read PHP | date_time_set() Function The date_time_set() function is an inbuilt function in PHP which is used to sets the time. This function resets the current time of the DateTime object to a different time. Syntax: Procedural style: date_time_set( $object, $hour, $minute, $second, $microseconds ) Object oriented style: DateTime::set 2 min read PHP date_sub() Function The date_sub() function is an inbuilt function in PHP that is used to subtract days, months, years, hours, minutes, and seconds from given date. This function returns a DateTime object on success and FALSE on failure. Syntax: date_sub($object, $interval)Parameters: The date_sub() function accepts tw 2 min read PHP | date_modify() Function The date_modify() function is an inbuilt function in PHP. Through the help of this function, we can modify or can alter the timestamp of DateTime object. The DateTime object and string modify are parameters in the calling function. Syntax: date_modify(DateTime $object, string $modify); Parameters: T 2 min read PHP | date_sunrise() Function The date_sunrise() is an inbuilt function in PHP which is used to find the sunrise time for a specified day and location. This function returns the time of the sunrise, in the specified format, on success. FALSE on failure. Syntax: date_sunrise ( $timestamp, $format, $latitude, $longitude, $zenith, 2 min read PHP | date_timestamp_get() Function The date_timestamp_get() function is an inbuilt function in PHP which is used to gets the Unix timestamp. This function returns the Unix timestamp representing the date. Syntax: Procedural style: int date_timestamp_get( $object ) Object oriented style: int DateTime::getTimestamp( void ) int DateTime 1 min read Like