خرید بک لینک

Vote count: 0

How to display difference between two dates without the weekends in years, month and day ?

Right now to calculate difference I am using this, but I need without weeks :

$datetime1 = new DateTime("05/01/2016");
$datetime2 = new DateTime("06/01/2016");
$interval = $datetime1->diff($datetime2);

echo $interval->format('%y years %m months and %d days');

#result : 
0 years 1 months and 1 days

asked 52 secs ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 7 تير 1395 ساعت: 17:23

صفحه بندی