Skip to content

Instantly share code, notes, and snippets.

@srogier
Last active August 29, 2015 14:11
Show Gist options
  • Save srogier/f3ac43f5365671942508 to your computer and use it in GitHub Desktop.
Save srogier/f3ac43f5365671942508 to your computer and use it in GitHub Desktop.
Zend_date
<?php
$date = new Zend_Date('2014-12-28');
$date->addDay(1);
echo $date->toString('YYYY-MM-dd'); // 2015-12-29
// edit : works fine with yyyy instead of YYYY
echo $date->toString('yyyy-MM-dd'); // 2014-12-29
// RTFM is here : http://framework.zend.com/manual/1.12/en/zend.date.constants.html#zend.date.constants.selfdefinedformats
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment