Guidance Solution for Magento, Php developers
Pages
Home
Magento
Magento 2
Magento interview Q&A
Laravel
Php
MySql
JQuery
Friday 12 June 2015
date difference in php
$d1 = new DateTime("2009-07-01");
$d2 = new DateTime("2010-05-31");
var_dump($d1->diff($d2)->m + ($d1->diff($d2)->y*12));
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment