/ home / php / show the days # difference from a time stamp php function /

Show the Days # difference from a time stamp PHP Function

11:14 pm, February 25, 2016 589 73 0.4 @ 200 wpmrate up KruXoR source
1

Original Post Date: 12:03 am, August 26, 2014

Shows the difference between now and a timestamp, you could also replace this with another timestamp to get the difference between another timestamp.

function time_diff_days($your_date) { $now = time(); // or your date as well $your_date = strtotime($your_date); $datediff = $now - $your_date; return floor($datediff/(60*60*24));
}

just made a function from the stack overflow version of this.

stackoverflow.com
11:14 pm, February 25, 2016 589 73 source

Comments

Reports

Add Report

Report's

KruXoR

This is a site where i basically just post whatever i feel like at the time, it has no one particular topic but usually. Just my ideas and links and random bits of code that i find.

Follow Me..

@KruXoR

Minecraft

Looking for the kruxor minecraft server mc.kruxor.com? we have migrated it to... icekraft.com if you want to play on there just connect to play.icekraft.com:25535 or mc.kruxor.com should also still work.

Favorite Links