Decrease 5 days from a date [duplicate]
Possible Duplicate:
Subtracting a certain number of hours, days, months or years from date 开发者_如何转开发
Hello, how can I decrease 5 days from a date like:
date("d.m.y");
-Thanks
date('d.m.y', strtotime('-5 days'));
date("d.m.y",mktime(0,0,0,date("m"),date("d")-5,date("Y")))
Avoid strtotime when possible, it is slow
date('d.m.y',time() - 432000); // 60 * 60 * 24 * 5
精彩评论