投稿   成为会员    会员登陆     站内搜索    RSS订阅    移动版
我要投稿我要投稿PHPer的博客PHPer知道PHPer上网导航
当前位置: PHPer草根谭 > 所有评论
  • PHP的日期比较大小函数方法
  • Posted By:访客(58.215.235.30) At 2012-03-21 17:19:59
  • function specialinfo_form_validate($form,&$form_state)
    {
    $startdate=$form_state['values']['s_startdate'];
    $enddate=$form_state['values']['s_enddate'];
    if(date("Y-m-d",strtotime($startdate))<date("Y-m-d",time()))
    {
    form_set_error($startdate,t('the Start date not small and the current date !'));
    }
    if(date("Y-m-d",strtotime($startdate))>date("Y-m-d",strtotime($enddate)))
    {
    form_set_error($enddate,t('the end date beyond the start date !'));
    }
    }
    感谢楼主的精彩代码!谢谢!

[2] [3] [4] [5] [6] [7] [8] [9] [10] > >>

 
 

合作站点:

php2345网址导航