Home | 简体中文 | 繁体中文 | 杂文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 作品与服务 | Email

3.7. 日期函数

3.7.1. strtotime

$start_date = date("Y-m-d H:i:s", strtotime('next Saturday'));
$start_week = date("Y-m-d", strtotime("last week"));
$end_week = date("Y-m-d", strtotime("this week"));
$sat = strtotime('saturday');
$start_date = date("Y-m-d H:i:s", strtotime('Saturday'));
$start = strtotime('2 weeks ago');
			

3.7.2. 日期比较

			
if(strftime('%Y-%m-%d',strtotime('2009-04-19')) <= date('Y-m-d')){
	to-do ...
}
			
			
comments powered by Disqus