Question: How to retrieve the ISO Date in PHP?
I am a beginner in PHP programming language. I have a query how to retrieve the ISO Date in PHP Language. Can any one suggest any reference for this.
Are you looking for the syntax of how to fetch ISO Date Format in PHP? By using this DateTime::setISODate() function you will be retrieve the ISO Date from the specific date. For details look below example of the ISO date function in PHP ...
Examples of ISO Date Function in PHP...
<?php date_default_timezone_set('India/Kolkata'); $datetime = new DateTime(); // Offset from start of week 2 (7) = 5 $datetime->setISODate(2009, 2, 5); // Day 5 of week 2 of 2009 is the 9th of January. // Offset from start of week 2 (7) = 10 $datetime->setISODate(2009, 2, 10); // Day 10 of week 2 of 2009 is the 14th of January. ?>