I need to add an expiry date to an xml feed for a jobs website in YYYYMMDD format.
The position needs to expire 60 days after the initial posting date, i’ve used the code below to return the date each job was posted.
// Job date
$date = $xml_document->createElement("date");
$date->appendChild($xml_document->createCDATASection( get_the_date('Ymd') ));
$job_element->appendChild($date);
How do I simply grab this date and add 60 days to it?
Thanks 🙂
1 comment
Comments are closed.