
Search In
Here is a short function to get the difference between two timezones in PHP:-
function diff(){
$date1 = "2014-02-27T20:00:00+04:00";
$date2 = "2014-02-28T07:20:00+08:00";
$diff = abs(strtotime($date2) - strtotime($date1));
$year
Hello readers, today we will discuss about "Calculating the difference between two dates in PHP".
For example, we have 2 dates and we wants to find the difference between them in php so we can use the below code:
$date1 = "2007-03-24";
$date2 = "20
Hello Readers
If you want to calculate difference between two dates using PHP , use below code.
comment: Suppose we have the two dates below date1 and date2
$date1 = "2014-06-11";
$date2 = "2015-07-16";
comment:then we get diffrence with absolute
We can easily find date difference in php by using strtotime which convert two dates to unix time once convert we can manipulate easily by calculating the number of seconds between them.Its the easy way to calculate different time periods.
$date1
Hello friends,
I have two date 2016-04-04 and 2016-08-31 and now I want to display its difference as 4 months 24 days format. I have created a function to return date difference in year, months and days format
$date1 = '2016-08-31';
$date2 = '2016
If we have to find duration or difference between two times of same date then
Let we have $dtime and $atime as two times of same date then
$dep=EXPLODE(':',$dtime);
$arr=EXPLODE(':',$atime);
$diff=ABS(MKTIME($dep[0],$dep[1],0,DATE('n'),DATE('j'),
Progress bars in Bootstrap.
Bootstrap helps in providing up-to-date feedback on the progress of a workflow or action.This can be done by using progress bars.You can also add label to the progress bar thus making it more user-friendly.
<div class
