如何制作$your_date = strtotime("2010-01-01")
动态?我的意思是(“2010-01-01”)一个(“动态”)?
这是代码:
$started = get_post_meta(get_the_ID(), 'wtf_started', true);
$now = time(); // or your date as well
$your_date = strtotime("$started");
$datediff = $now - $your_date;
echo floor($datediff/(60*60*24));