PHP date_isodate_set() Function
PHP Date/Time Reference Manual
Example
Set the ISO date for week 5 of 2013:
Run Example »
Definition and Usage
The date_isodate_set() function sets a date according to the ISO 8601 standard, using week and day offsets (instead of a specified date).
Syntax
date_isodate_set(
object,year,week,day);
| Parameters | Description |
|---|---|
| object | Required. Specifies a DateTime object returned by date_create() DateTime object returned by |
| year | Required. Specifies the year of the date. |
| week | Required. Specifies the week of the date. |
| day | Optional. Specifies the offset from the first day of the week. Default is 1. |
Technical Details
| Return Value: | Returns a DateTime object on success, or FALSE on failure. |
|---|---|
| PHP Version: | 5.2+ |
| Changelog: | PHP 5.3.0: The return value changed from NULL to DateTime. |
PHP Date/Time Reference Manual