date validation not to be today

后端 未结 3 551
無奈伤痛
無奈伤痛 2021-01-27 16:01

I need to validate 2 date that never should be same.If same it will return false.Code is in PHP.It is always giving o/p as false.

function BeforeAdd($values, $me         


        
3条回答
  •  [愿得一人]
    2021-01-27 16:50

    Any one can suggest me a code to return false id date is today else true in the format

    function BeforeAdd($values, $message, $inline, $pageObject)
    {
        $d1 = $values['DATE'];     //date 1 in dd/mm/yyyy format
        $d2 = now();  
    
        if($d1>$d2)
        {
            return true;  
        }
    
        echo '';
    
        return false;  
    }
    

提交回复
热议问题